/* =========================================
   BIGNAT - GLOBAL STYLES & VARIABLES
========================================= */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #0f172a;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;

    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;

    --radius: 16px;
    --shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}


/* =========================================
   TOPBAR & HEADER
========================================= */

.topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    width: 100%;
    height: 70px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
}

.brand {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.topbar nav a {
    color: var(--muted);
    font-weight: 600;
    transition: 0.2s ease;
}

.topbar nav a:hover,
.topbar nav a.active {
    color: var(--primary);
}

.menu-toggle {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--primary);
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.menu-toggle:hover {
    opacity: 0.9;
}


/* =========================================
   SLIDE-OUT USER MENU & OVERLAY
========================================= */

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: 0.25s ease;
}

.menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    max-width: 85%;
    background: var(--card);
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 8px 0 30px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 25px;
}

.side-menu.open {
    transform: translateX(0);
}

.side-menu-header {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.side-menu-brand {
    font-size: 23px;
    font-weight: 800;
    color: var(--primary);
}

.menu-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: #f1f5f9;
    color: var(--text);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.side-menu-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px;
    background: #f8fafc;
    flex-shrink: 0;
}

.user-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 19px;
}

.side-menu-user strong {
    display: block;
    color: var(--text);
    font-size: 15px;
}

.side-menu-user small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.side-navigation {
    padding: 15px 12px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 14px;
    margin-bottom: 5px;
    border-radius: 11px;
    color: #334155;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s ease;
}

.menu-item span:first-child {
    width: 25px;
    text-align: center;
    font-size: 19px;
}

.menu-item:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.menu-item.active {
    background: #eff6ff;
    color: var(--primary);
}

.side-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 5px 20px 15px;
}

.logout-item {
    margin: 0 12px;
    color: var(--danger);
}

.logout-item:hover {
    background: #fef2f2;
    color: var(--danger);
}


/* =========================================
   DASHBOARD CONTAINER & SECTIONS
========================================= */

.dashboard-container {
    width: min(1200px, 92%);
    margin: 40px auto;
}

.welcome {
    margin-bottom: 30px;
}

.welcome h1 {
    font-size: 32px;
    margin-bottom: 5px;
}

.welcome p {
    color: var(--muted);
}


/* =========================================
   STAT CARDS
========================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

.stat-card h3 {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-card strong {
    display: block;
    font-size: 27px;
    font-weight: 800;
}


/* =========================================
   REFERRAL CARD
========================================= */

.referral-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.referral-card h2 {
    margin-bottom: 5px;
}

.referral-card p {
    color: var(--muted);
    margin-bottom: 20px;
}

.referral-box {
    display: flex;
    gap: 10px;
}

.referral-box input {
    flex: 1;
    min-width: 0;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
    outline: none;
}

.referral-box button {
    border: 0;
    background: var(--primary);
    color: white;
    padding: 0 22px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s ease;
}

.referral-box button:hover {
    background: var(--primary-dark);
}


/* =========================================
   QUICK ACTIONS
========================================= */

.quick-actions {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.quick-actions h2 {
    margin-bottom: 20px;
}

.actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.actions a {
    background: #eff6ff;
    color: var(--primary);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    transition: 0.2s ease;
}

.actions a:hover {
    background: var(--primary);
    color: white;
}


/* =========================================
   FORMS
========================================= */

.form-container {
    width: min(500px, 92%);
    margin: 60px auto;
}

.form-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.form-card h1 {
    text-align: center;
    margin-bottom: 8px;
}

.form-card .subtitle {
    text-align: center;
    color: var(--muted);
    margin-bottom: 28px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 7px;
}

.form-control {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    background: white;
    transition: 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
    width: 100%;
    border: 0;
    padding: 14px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn:hover {
    background: var(--primary-dark);
}


/* =========================================
   ALERTS
========================================= */

.alert {
    padding: 13px 15px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-weight: 600;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}


/* =========================================
   RESPONSIVE MEDIA QUERIES
========================================= */

@media (max-width: 800px) {
    .topbar {
        padding: 0 4%;
    }

    .topbar nav {
        gap: 12px;
    }

    .topbar nav a {
        font-size: 13px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .welcome h1 {
        font-size: 26px;
    }
}

@media (max-width: 600px) {
    .topbar {
        height: 64px;
        padding: 0 15px;
    }

    .brand {
        font-size: 21px;
    }

    .side-menu {
        width: 285px;
    }
}

@media (max-width: 520px) {
    .dashboard-container {
        margin: 25px auto;
    }

    .referral-box {
        flex-direction: column;
    }

    .referral-box button {
        padding: 13px;
    }

    .actions {
        grid-template-columns: 1fr;
    }

    .form-card {
        padding: 23px;
    }
}



/* ============================================
   BIGNAT - MOBILE DASHBOARD IMPROVEMENTS
============================================ */

@media (max-width: 600px) {

    .dashboard-container {
        width: 100%;
        max-width: 100%;
        padding: 20px 15px 40px;
    }


    /* Welcome section */

    .welcome {
        padding: 8px 4px 20px;
    }

    .welcome h1 {
        font-size: 28px;
        line-height: 1.25;
        margin-bottom: 8px;
    }

    .welcome p {
        font-size: 15px;
        line-height: 1.5;
        margin: 0;
    }


    /* Statistics */

    .stats-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 20px;
    }


    .stat-card {
        min-height: 145px;
        height: auto;
        padding: 22px;
        border-radius: 18px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }


    .stat-card h3 {
        font-size: 15px;
        margin: 0 0 12px;
        color: #64748b;
    }


    .stat-card strong {
        font-size: 30px;
        line-height: 1.1;
        color: #0f172a;
    }


    /* Referral card */

    .referral-card {
        padding: 15px;
        border-radius: 10px;
        margin-bottom: 10px;
    }


    .referral-card h2 {
        font-size: 115px;
        margin-bottom: 8px;
    }


    .referral-card p {
        font-size: 15px;
        line-height: 1.5;
    }


    .referral-box {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }


    .referral-box input {
        width: 100%;
        min-width: 0;
        font-size: 13px;
    }


    .referral-box button {
        width: 100%;
    }


    /* Quick actions */

    .quick-actions {
        padding: 22px;
        border-radius: 18px;
        margin-bottom: 18px;
    }


    .quick-actions h2 {
        font-size: 21px;
    }


    .actions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }


    .actions a {
        min-height: 85px;
        padding: 15px 10px;
        border-radius: 14px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }


    /* Account information */

    .quick-actions > div[style] {
        grid-template-columns: 1fr !important;
    }


    /* Top bar */

    .topbar {
        height: 64px;
        padding: 0 15px;
    }


    .brand {
        font-size: 21px;
    }
}

.coupon-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: 12px;
    transition: 0.2s ease;
}

.coupon-card:hover {
    border-color: var(--primary);
}



/* Reduce padding and spacing for Tasks & Referrals cards */
.action-card-new {
    padding: 14px 12px !important;
    min-height: auto !important;
}

.action-card-new .icon {
    font-size: 24px !important;
    margin-bottom: 4px !important;
}

.action-card-new h3 {
    font-size: 15px !important;
    margin: 0 0 2px !important;
}

.action-card-new p {
    font-size: 12px !important;
    margin: 0 0 8px !important;
}

.action-card-new a {
    font-size: 12px !important;
}

/* Reduce padding and spacing for Learn Skills & Spin & Win cards */
.action-card {
    padding: 12px 10px !important;
    min-height: auto !important;
}

.action-card .action-icon {
    font-size: 22px !important;
    margin-bottom: 4px !important;
}

.action-card .action-title {
    font-size: 14px !important;
    margin-bottom: 2px !important;
}

.action-card .action-sub {
    font-size: 11px !important;
}

/* Bring the grid cards closer together */
.grid-cards-new, .quick-actions-grid {
    gap: 10px !important;
    margin-bottom: 10px !important;
}
/* Make all action cards extra compact and small */
.action-card {
    padding: 8px 10px !important;
    min-height: unset !important;
    height: auto !important;
}

.action-card .action-icon {
    font-size: 18px !important;
    margin-bottom: 2px !important;
}

.action-card .action-title {
    font-size: 12px !important;
    font-weight: 600 !important;
    margin-bottom: 1px !important;
}

.action-card .action-sub {
    font-size: 10px !important;
    line-height: 1.2 !important;
}

/* Reduce gaps between the rows of cards */
.grid-cards-new, .quick-actions-grid {
    gap: 8px !important;
    margin-bottom: 8px !important;
}

