/* ============================================================
   GLOBAL LAYOUT (REAL APP STYLE)
   Header stuck to top, footer at bottom, content scrolls between
   ============================================================ */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #020617; /* dark slate background */
    color: #e5e7eb;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
                 "Segoe UI", sans-serif;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Scrollable middle area */
.page-content {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 16px;
    padding-bottom: 24px;
}

/* Card container inside content (dashboard/activations) */
.auth-card {
    max-width: 960px;
    width: 100%;
}

/* ============================================================
   HEADER (TOP BAR)
   Branding left, hamburger + nav right
   ============================================================ */

.gygo-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    padding-top: calc(env(safe-area-inset-top, 0px) + 10px);
    background: radial-gradient(circle at top left, #111827, #020617);
    border-bottom: 1px solid #111827;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

/* Branding area (left) */
.gygo-branding {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gygo-brand-text {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #f9fafb;
}

.gygo-user-email {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Right-side nav area: hamburger + menu */
.gygo-nav-area {
    display: flex;
    align-items: center;
    position: relative;
}

/* Hidden checkbox controlling mobile menu */
.nav-toggle {
    display: none;
}

/* Hamburger icon */
.nav-toggle-label {
    display: none; /* shown in mobile breakpoint */
    cursor: pointer;
    padding: 6px;
    border-radius: 999px;
    transition: background 0.15s ease-out;
}

.nav-toggle-label:hover {
    background: rgba(15, 23, 42, 0.6);
}

.nav-toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: #e5e7eb;
    margin: 3px 0;
    border-radius: 999px;
}

/* Desktop nav menu (inline) */
.gygo-nav-menu {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.85rem;
}

.gygo-nav-menu .nav-item {
    color: #a7f3d0;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 999px;
    transition: background 0.15s ease-out, color 0.15s ease-out;
}

.gygo-nav-menu .nav-item:hover {
    background: rgba(34, 197, 94, 0.15);
    color: #bbf7d0;
}

/* Logout accent */
.gygo-nav-menu .nav-danger {
    color: #fecaca;
}

.gygo-nav-menu .nav-danger:hover {
    background: rgba(248, 113, 113, 0.15);
    color: #fee2e2;
}

/* ============================================================
   FOOTER (BOTTOM BAR)
   ============================================================ */

.gygo-footer {
    margin-top: auto;
    border-top: 1px solid #111827;
    background: #020617;
    padding: 12px 16px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
}

.gygo-footer-inner {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.gygo-footer-text {
    font-size: 0.75rem;
    color: #64748b;
}

/* ============================================================
   DASHBOARD / ACTIVATIONS CARDS
   ============================================================ */

/* Inner section cards (Your plugins, Licensed machines, Next up) */
.dash-card {
    background: #020617;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #1f2937;
    margin-bottom: 14px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

/* Section titles inside cards */
.dash-section-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.dash-card {
    background: rgba(18, 22, 34, 0.85);
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}


/* ============================================================
   DASHBOARD: PLUGIN LIST (on dashboard.php)
   ============================================================ */

.dash-plugin-item {
    margin-bottom: 12px;
}

.dash-plugin-meta {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* ============================================================
   ACTIVATIONS TABLE (DESKTOP) – activations.php
   ============================================================ */

.dash-activations-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.dash-activations-table th,
.dash-activations-table td {
    border-bottom: 1px solid #1f2937;
    padding: 6px 6px;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

/* Desktop column hints */
.dash-col-plugin {
    width: 20%;
}

.dash-col-serial {
    width: 28%;
    white-space: normal;
    word-break: break-all;
}

.dash-col-machine {
    width: 14%;
}

.dash-col-status {
    width: 10%;
}

.dash-col-activated {
    width: 14%;
}

.dash-col-released {
    width: 14%;
}

.dash-col-actions {
    width: 80px;
    text-align: center;
}

/* Wrapper for desktop table (can scroll horizontally if needed) */
.activations-desktop {
    display: block;
    overflow-x: auto;
}

/* Mobile list hidden by default on desktop */
.activations-mobile {
    display: none;
}

/* ============================================================
   ACTIVATIONS: STATUS BADGES + BUTTON
   ============================================================ */

.dash-activations-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    border: 1px solid #4b5563;
}

.dash-activations-badge-active {
    border-color: #22c55e;
    color: #bbf7d0;
}

.dash-activations-badge-released {
    border-color: #6b7280;
    color: #d1d5db;
}

.dash-release-btn {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #f97316;
    background: transparent;
    color: #fed7aa;
    font-size: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
}

.dash-release-btn:hover {
    background: #7c2d12;
}

/* ============================================================
   MOBILE / SMALL SCREENS (iPhone)
   ============================================================ */

@media (max-width: 768px) {
    /* Header layout tweaks */
    .gygo-header {
        padding-left: 14px;
        padding-right: 14px;

        /* Keep header pinned to top on phones */
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 2000;
    }

    /* Push content down so it doesn’t hide under the fixed header */
    body {
        padding-top: 72px; /* bump to 80–88px if still a bit tight */
    }

    .gygo-brand-text {
        font-size: 1rem;
    }

    .gygo-user-email {
        font-size: 0.7rem;
    }

    /* Show hamburger on small screens */
    .nav-toggle-label {
        display: block;
    }

    /* Mobile nav: hidden by default, appears as dropdown */
    .gygo-nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        margin-top: 6px;
        padding: 8px 10px;
        background: #020617;
        border-radius: 10px;
        border: 1px solid #1f2937;
        box-shadow: 0 14px 35px rgba(0, 0, 0, 0.6);
        flex-direction: column;
        align-items: flex-start;
        min-width: 160px;
        z-index: 60;
    }

    .gygo-nav-menu .nav-item {
        width: 100%;
        padding: 6px 10px;
    }

    /* Toggle on when checkbox checked */
    .nav-toggle:checked + .nav-toggle-label + .gygo-nav-menu {
        display: flex;
    }

    /* Page content padding a bit tighter */
    .page-content {
        padding: 12px;
        padding-bottom: 18px;
    }

    .dash-card {
        padding: 12px;
    }

    .dash-section-title {
        font-size: 0.9rem;
    }

    .dash-plugin-item {
        margin-bottom: 12px;
    }

    .dash-release-btn {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    /* ACTIVATIONS:
       Use stacked cards instead of a wide table on phones
    */
    .activations-desktop {
        display: none;
    }

    .activations-mobile {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .activation-card {
        border-radius: 10px;
        border: 1px solid #1f2937;
        padding: 10px 12px;
        background: #020617;
    }

    .activation-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 4px;
    }

    .activation-plugin {
        font-size: 0.9rem;
        font-weight: 600;
    }

    .activation-row {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        margin-top: 4px;
    }

    .activation-label {
        font-size: 0.7rem;
        color: #9ca3af;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .activation-value {
        font-size: 0.8rem;
        text-align: right;
        word-break: break-all;
    }

    .activation-actions {
        margin-top: 8px;
        text-align: right;
    }
}