/* ========================================
   SKIP THE SLOT - MOBILE-FIRST CSS
   ======================================== */

/* === RESET & BASE === */
html,
body,
div,
span,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
img,
ul,
li,
form,
label,
input,
select,
textarea,
button,
header,
nav,
section,
footer {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #5B4FCF;
    --primary-dark: #4a3fb5;
    --secondary: #FF6B35;
    --success: #2ECC71;
    --danger: #E74C3C;
    --warning: #F39C12;
    --dark: #2C3E50;
    --gray: #95A5A6;
    --light: #F8F9FA;
    --white: #FFFFFF;
    --border: #E0E0E0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #2C3E50;
    background: #F5F7FA;
    font-size: 16px;
    overflow-x: hidden;
}

/* === CONTAINER === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* === HEADER & NAVIGATION === */
header {
    background: #FFFFFF;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
    position: relative;
}

.logo {
    font-size: 1.25rem;
    font-weight: bold;
    color: #5B4FCF;
    text-decoration: none;
}

@media (min-width: 768px) {
    .logo {
        font-size: 1.5rem;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #2C3E50;
    padding: 0.5rem;
    z-index: 1001;
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* Navigation Links */
.nav-links {
    list-style: none;
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #FFFFFF;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 1rem;
    gap: 0.5rem;
}

.nav-links.active {
    display: flex;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
        flex-direction: row;
        position: static;
        box-shadow: none;
        padding: 0;
        gap: 1.5rem;
        align-items: center;
    }
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    color: #2C3E50;
    font-weight: 500;
    padding: 0.75rem 1rem;
    display: block;
    border-radius: 8px;
    transition: all 0.3s;
}

@media (min-width: 768px) {
    .nav-links a {
        padding: 0.5rem 1rem;
    }
}

.nav-links a:hover {
    color: #5B4FCF;
    background: #F8F9FA;
}

/* === BUTTONS === */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: #5B4FCF;
    color: #FFFFFF;
}

.btn-primary:hover {
    background: #4a3fb5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(91, 79, 207, 0.3);
}

.btn-secondary {
    background: #FF6B35;
    color: #FFFFFF;
}

.btn-secondary:hover {
    background: #e55a2e;
    transform: translateY(-2px);
}

.btn-success {
    background: #2ECC71;
    color: #FFFFFF;
}

.btn-success:hover {
    background: #27ae60;
    transform: translateY(-2px);
}

.btn-danger {
    background: #E74C3C;
    color: #FFFFFF;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #5B4FCF;
    border: 2px solid #5B4FCF;
}

.btn-outline:hover {
    background: #5B4FCF;
    color: #FFFFFF;
}

/* Mobile button adjustments */
@media (max-width: 767px) {
    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .btn-block-mobile {
        display: block;
        width: 100%;
    }
}

/* === HERO SECTION === */
.hero {
    background: linear-gradient(135deg, #5B4FCF 0%, #7C6FD8 100%);
    color: #FFFFFF;
    padding-top: 3rem;
    padding-bottom: 3rem;
    text-align: center;
}

@media (min-width: 768px) {
    .hero {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

.hero h1 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }
}

.hero p {
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

@media (min-width: 768px) {
    .hero p {
        font-size: 1.25rem;
    }
}

/* === CARDS === */
.card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .card {
        padding: 2rem;
    }
}

.card-header {
    margin-bottom: 1.5rem;
}

.card-title {
    color: #2C3E50;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .card-title {
        font-size: 1.75rem;
    }
}

/* === DASHBOARD GRID === */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

/* === STAT CARDS === */
.stat-card {
    background: linear-gradient(135deg, #5B4FCF 0%, #7C6FD8 100%);
    color: #FFFFFF;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(91, 79, 207, 0.2);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .stat-number {
        font-size: 2.5rem;
    }
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.95;
}

@media (min-width: 768px) {
    .stat-label {
        font-size: 1rem;
    }
}

/* === FORMS === */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2C3E50;
    font-size: 0.95rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #FFFFFF;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #5B4FCF;
    box-shadow: 0 0 0 3px rgba(91, 79, 207, 0.1);
}

.form-control:disabled {
    background: #F8F9FA;
    cursor: not-allowed;
    opacity: 0.6;
}

select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232C3E50' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    padding-right: 2.5rem;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* === ALERTS === */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.alert-success {
    background: #D4EDDA;
    border: 1px solid #C3E6CB;
    color: #155724;
}

.alert-error {
    background: #F8D7DA;
    border: 1px solid #F5C6CB;
    color: #721C24;
}

.alert-warning {
    background: #FFF3CD;
    border: 1px solid #FFEEBA;
    color: #856404;
}

.alert-info {
    background: #D1ECF1;
    border: 1px solid #BEE5EB;
    color: #0C5460;
}

/* === TABLES === */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    table {
        font-size: 1rem;
    }
}

table th,
table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #E0E0E0;
}

@media (min-width: 768px) {
    table th,
    table td {
        padding: 1rem;
    }
}

table th {
    background: #F8F9FA;
    font-weight: 600;
    color: #2C3E50;
    white-space: nowrap;
}

table tbody tr:hover {
    background: #F8F9FA;
}

/* Mobile table improvements */
@media (max-width: 767px) {
    table {
        font-size: 0.85rem;
    }
    
    table th,
    table td {
        padding: 0.5rem;
    }
}

/* === FOOTER === */
footer {
    background: #2C3E50;
    color: #FFFFFF;
    padding-top: 2rem;
    padding-bottom: 2rem;
    margin-top: 3rem;
    text-align: center;
}

@media (min-width: 768px) {
    footer {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

footer a {
    color: #FFFFFF;
    text-decoration: underline;
}

footer a:hover {
    color: #5B4FCF;
}

/* === COUNTDOWN TIMER === */
.countdown {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .countdown {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

.countdown-item {
    background: #F8F9FA;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.countdown-number {
    font-size: 1.75rem;
    font-weight: bold;
    color: #5B4FCF;
}

@media (min-width: 768px) {
    .countdown-number {
        font-size: 2.5rem;
    }
}

.countdown-label {
    font-size: 0.85rem;
    color: #95A5A6;
    text-transform: uppercase;
}

/* === MOBILE SPECIFIC === */
@media (max-width: 767px) {
    /* Increase touch targets */
    a, button, input, select, textarea {
        min-height: 44px;
    }
    
    /* Better spacing on mobile */
    section {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Stack elements on mobile */
    .flex-mobile-stack {
        flex-direction: column;
    }
    
    /* Hide on mobile */
    .hide-mobile {
        display: none;
    }
}

/* === TABLET SPECIFIC === */
@media (min-width: 768px) and (max-width: 1023px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === DESKTOP SPECIFIC === */
@media (min-width: 1024px) {
    /* Show on desktop only */
    .show-desktop {
        display: block;
    }
}

/* === UTILITIES === */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }

.flex-wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-100 { width: 100%; }

/* === LOADING STATES === */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(91, 79, 207, 0.3);
    border-radius: 50%;
    border-top-color: #5B4FCF;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner-center {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* === TOUCH IMPROVEMENTS === */
@media (hover: none) {
    .btn:active {
        transform: scale(0.98);
    }
    
    .nav-links a:active {
        background: #F8F9FA;
    }
    
    /* Remove hover effects on touch devices */
    .btn:hover {
        transform: none;
    }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    html,
    body,
    div,
    span,
    button,
    a {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
    }
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #5B4FCF;
    outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* === PRINT STYLES === */
@media print {
    header,
    footer,
    .no-print,
    .btn {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    a {
        text-decoration: underline;
    }
}
