/* ==========================================================================
   HeirloomXI | Global Operations Style System
   ========================================================================== */

* {
    box-sizing: border-box;
}

body {
    background-color: #121214;
    color: #e1e1e6;
    font-family: system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 20px;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Page context wrappers */
.dashboard-page {
    padding: 20px;
}

.signup-page {
    padding: 12px;
}

/* Recruitment page tweaks */
.apply-page {
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

.form-container {
    background-color: #202024;
    border: 1px solid #29292e;
    max-width: 650px;
    width: 100%;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

h1 {
    margin: 0 0 10px 0;
    color: #fff;
    font-size: 26px;
}

.sub-header {
    color: #8d8d99;
    font-size: 14px;
    margin-bottom: 30px;
    border-bottom: 1px solid #29292e;
    padding-bottom: 15px;
}

.form-group {
    margin-bottom: 22px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: #fff;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 12px;
    background-color: #121214;
    border: 1px solid #29292e;
    border-radius: 4px;
    color: #fff;
    font-size: 15px;
    box-sizing: border-box;
}

input[type="text"]:focus,
textarea:focus {
    border-color: #04d361;
    outline: none;
}

textarea {
    height: 120px;
    resize: vertical;
    font-family: inherit;
}

.btn-submit {
    background-color: #04d361;
    color: #121214;
    border: none;
    font-weight: bold;
    padding: 14px 28px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
    margin-top: 10px;
}

.btn-submit:hover {
    background-color: #02b652;
}

.error-box {
    background-color: #f75a6820;
    border: 1px solid #f75a68;
    color: #f75a68;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 25px;
    font-size: 14px;
}

.sidebar-success-box,
.success-box {
    background-color: #04d36120;
    border: 1px solid #04d361;
    color: #04d361;
    padding: 25px;
    border-radius: 4px;
    text-align: center;
}

.success-box h2 {
    margin: 0 0 10px 0;
    color: #fff;
}

/* Top bar Navigation and overlays */
.top-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #29292e;
    padding-bottom: 10px;
    margin-bottom: 25px;
}

.top-nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-grow: 1;
}

.nav-logo-link {
    display: flex;
    align-items: center;
}

.nav-logo-img {
    height: 38px;
    width: 38px;
    border-radius: 6px;
    border: 1px solid #5865F2;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.nav-logo-img:hover {
    transform: scale(1.05);
    border-color: #7289da;
}

.burger-menu-icon {
    font-size: 24px;
    cursor: pointer;
    color: #5865F2;
    padding: 0 5px;
}

.page-header {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    width: 100%;
}

.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: flex-end;
}

.drawer {
    background: #202024;
    width: 260px;
    height: 100%;
    padding: 12px 20px;
    border-left: 1px solid #29292e;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-left: auto;
}

.drawer h3 {
    margin: 0;
    color: #fff;
    border-bottom: 1px solid #29292e;
    padding-bottom: 6px;
    font-size: 16px;
    text-transform: uppercase;
}

.nav-user-badge {
    background: #121214;
    border: 1px solid #29292e;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    text-align: left;
}

.nav-user-name {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    border-bottom: 1px solid #29292e;
    padding-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-user-balances {
    display: flex;
    gap: 10px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.dkp-badge {
    background: rgba(241, 196, 15, 0.12);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.25);
}

.ppp-badge {
    background: rgba(46, 204, 113, 0.12);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.25);
}

.drawer-link {
    color: #c4c4cc;
    text-decoration: none;
    font-size: 15px;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 4px;
    display: block;
}

.drawer-link:hover {
    background: #29292e;
    color: #5865F2;
}

/* Operational Dashboard Grid and Cards */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.card {
    background-color: #202024;
    border-radius: 6px;
    padding: 20px;
    border: 1px solid #29292e;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.card h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
}

.nm-thumb {
    width: 42px;
    height: 42px;
    border-radius: 4px;
    background-color: #121214;
    object-fit: contain;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.meta-label {
    color: #8d8d99;
}

.meta-value {
    font-weight: 500;
    color: #c4c4cc;
    font-size: 13px;
}

.countdown-container {
    margin-top: 15px;
    padding: 10px;
    background-color: #121214;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #29292e;
}

.countdown-label {
    font-size: 11px;
    color: #8d8d99;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.countdown-clock {
    font-size: 18px;
    font-weight: bold;
    color: #ff9000;
    font-family: monospace;
}

.est-badge {
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    background-color: #7159c1;
    color: #fff;
    text-transform: uppercase;
}

.weather-block {
    margin-top: 10px;
    font-size: 12px;
    padding: 8px;
    background-color: #29292e;
    border-radius: 4px;
    color: #e1e1e6;
    line-height: 1.4;
    border-left: 3px solid #ff9000;
}

.error-banner {
    background-color: #f75a6820;
    border: 1px solid #f75a68;
    color: #f75a68;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.btn-action {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    text-transform: uppercase;
    color: white;
}

/* Camp Hub Sign-ups specific styles */
.nm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.nm-square {
    position: relative;
    background-color: #202024;
    border: 1px solid #29292e;
    border-radius: 8px;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    overflow: hidden;
    padding: 0;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.nm-square.active-nm {
    box-shadow: 0 0 15px rgba(4, 211, 97, 0.45);
    border-color: #04d361;
}

.square-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.55;
}

.square-name {
    position: relative;
    z-index: 2;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 1), 0 0 6px rgba(0, 0, 0, 0.8);
    text-align: center;
    padding: 6px;
    text-transform: uppercase;
}

.main-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.section-card {
    background-color: #202024;
    border: 1px solid #29292e;
    border-radius: 8px;
    padding: 5px;
    width: 100%;
}

.section-card h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #fff;
    text-transform: uppercase;
}

.countdown-banner-card {
    background: #1a1a1e;
    border: 1px dashed #ff9000;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    margin-bottom: 10px;
}

.countdown-banner-clock {
    font-size: 20px;
    font-weight: bold;
    color: #ff9000;
    font-family: monospace;
    margin-top: 2px;
}

.job-grid-2rows {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
    margin-top: 8px;
}

.job-btn {
    background-color: #121214;
    color: #8d8d99;
    border: 1px solid #29292e;
    padding: 10px 4px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    width: 100%;
    text-transform: uppercase;
}

.job-btn.selected {
    background-color: #5865F2;
    color: #fff;
    border-color: #5865F2;
}

@media (max-width: 480px) {
    .job-grid-2rows {
        grid-template-columns: repeat(5, 1fr);
    }
}

.collapsed-job-container {
    background: #121214;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #29292e;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collapsed-label {
    font-size: 13px;
    font-weight: bold;
}

.collapsed-val {
    color: #5865F2;
    font-weight: 900;
    background: #202024;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #29292e;
    margin-left: 6px;
}

.alliance-header {
    background-color: #29292e;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    margin: 15px 0 6px 0;
    border-left: 4px solid #5865F2;
    text-transform: uppercase;
}

.party-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.party-column {
    background-color: #19191c;
    border: 1px solid #29292e;
    border-radius: 4px;
    padding: 4px;
}

.party-column h4 {
    margin: 0 0 6px 0;
    font-size: 10px;
    text-align: center;
    color: #8d8d99;
    text-transform: uppercase;
}

.grid-slot {
    background-color: #121214;
    border: 1px dashed #29292e;
    border-radius: 4px;
    min-height: 44px;
    margin-bottom: 4px;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4px;
    cursor: pointer;
}

.grid-slot.occupied {
    border-style: solid;
    border-left: 3px solid #5865F2;
    background-color: #202024;
    align-items: stretch;
    justify-content: space-between;
    flex-direction: column;
    padding: 4px;
}

.grid-slot.me {
    border-left-color: #04d361;
    background-color: #1f3a2b;
}

.slot-name {
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 3px;
    justify-content: center;
}

.slot-job {
    color: #5865F2;
    font-weight: 800;
    font-size: 10px;
    margin-top: 1px;
}

.btn-pop {
    background-color: #e14040;
    width: 100%;
    font-size: 15px;
    padding: 14px;
    margin-top: 12px;
    letter-spacing: 0.5px;
}

.status-marquee-fighting {
    padding: 12px;
    background-color: #1f3a2b;
    border: 1px solid #04d361;
    color: #04d361;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-marquee-rival {
    padding: 12px;
    background-color: #3b2518;
    border: 1px solid #ff9000;
    color: #ff9000;
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #5865F2;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
}

select,
input[type="datetime-local"] {
    width: 100%;
    padding: 10px;
    background: #121214;
    border: 1px solid #29292e;
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 5px;
}

/* Volunteer Containers */
.volunteer-container {
    background: #121214;
    padding: 14px;
    border-radius: 6px;
    border: 1px solid #29292e;
    margin-bottom: 12px;
    text-align: center;
}

.volunteer-title {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.5px;
}

.volunteer-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
}

.volunteer-name-badge {
    font-size: 15px;
    font-weight: 800;
    color: #5865F2;
    background: #19191c;
    padding: 6px 16px;
    border-radius: 4px;
    border: 1px solid #29292e;
    min-width: 140px;
    text-align: center;
    text-transform: none;
}

.confirm-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.confirm-box {
    background: #202024;
    border: 1px solid #29292e;
    padding: 25px;
    border-radius: 8px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.alliance-header,
.page-header,
.section-card h3,
.card h3 {
    font-family: "Lucida Console", "Courier New", monospace !important;
}

/* ==========================================================================
   DYNAMIC ACTION MAIN TERMINAL: DASHBOARD SIGNUP UPDATES
   ========================================================================== */
.active-now-container {
    display: flex;
    align-items: center;
    gap: 24px;
    background: linear-gradient(135deg, #1c1c22 0%, #131317 100%);
    border-top: 5px solid #04d361;
    border-radius: 8px;
    padding: 30px;
    box-sizing: border-box;
    width: 100%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.active-now-left-deck {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 130px;
    text-align: center;
}

.active-now-right-deck {
    flex: 1;
}

.active-now-photo-frame {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid #04d361;
    object-fit: cover;
    background-color: #121214;
}

.active-now-badge-ticker {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #04d361;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: monospace;
    font-size: 12px;
    color: #04d361;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.active-now-announcement-text {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    line-height: 1.3;
    margin: 0;
    letter-spacing: -0.3px;
}

/* Dashboard Interaction Link Overlay Button */
.dashboard-signup-action-btn {
    background: #5865f2;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: bold !important;
    padding: 12px 24px !important;
    border-radius: 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    display: inline-block !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 4px 12 rgba(88, 101, 242, 0.2) !important;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-signup-action-btn:hover {
    background: #4752c4 !important;
    box-shadow: 0 4px 16px rgba(88, 101, 242, 0.4) !important;
    cursor: pointer !important;
}

/* ==========================================================================
   MOBILE STYLING MODIFICATIONS (GRID LAYOUT PATCH - VERBATIM: IMAGE_5.PNG)
   ========================================================================== */
@media (max-width: 768px) {
    .active-now-container {
        display: grid !important;
        grid-template-columns: 2fr 1fr !important;
        /* Splices Row 1 into precisely 2/3 and 1/3 widths */
        gap: 16px !important;
        padding: 24px 16px !important;
    }

    /* display: contents unrolls internal sub-div columns so they respect the parent grid lines directly */
    .active-now-right-deck,
    .active-now-left-deck {
        display: contents !important;
    }

    /* GRID AREA 1: Left 2/3 Text Frame container */
    .active-now-text-group {
        grid-column: 1 / 2 !important;
        grid-row: 1 !important;
        text-align: left !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }

    .active-now-announcement-text {
        font-size: 22px !important;
        text-align: left !important;
        line-height: 1.2 !important;
    }

    .active-now-meta-item {
        font-size: 13px !important;
        text-align: left !important;
        margin-top: 4px !important;
    }

    /* GRID AREA 2: Right 1/3 Portrait slot on the same horizontal row plane */
    .active-now-photo-frame {
        grid-column: 2 / 3 !important;
        grid-row: 1 !important;
        width: 64px !important;
        height: 64px !important;
        margin: auto !important;
        /* Snaps the dragon image exactly into the center horizontal/vertical point */
        display: block !important;
    }

    /* GRID AREA 3: Full width Timer Container layout block positioned directly underneath Row 1 */
    .active-now-badge-ticker-expanded,
    .active-now-badge-ticker {
        grid-column: 1 / 3 !important;
        grid-row: 2 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-top: 8px !important;
    }

    /* GRID AREA 4: Full width Sign Up Button positioned at the very base level below the countdown */
    .dashboard-signup-action-btn {
        grid-column: 1 / 3 !important;
        grid-row: 3 !important;
        width: 100% !important;
        text-align: center !important;
        box-sizing: border-box !important;
        margin-top: 8px !important;
        display: block !important;
    }
}

/* ==========================================================================
   PORTAL LANDING SCREEN (index.php)
   ========================================================================== */
.portal-page-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 0;
}

.portal-card {
    background-color: #aaaaaa;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    text-align: center;
    max-width: 500px;
    /* Widened slightly to accommodate the image gallery */
    width: 100%;
    border: 1px solid #29292e;
}

/* Logo Styling */
.portal-logo {
    max-width: 90%;
    height: auto;
    margin: 0 auto 10px auto;
    display: block;
}

.portal-card h1 {
    color: #fff;
    margin: 0 0 10px 0;
    font-size: 28px;
    letter-spacing: 0.5px;
}

/* Gallery Layout for the Screenshots */
.portal-gallery {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.portal-gallery img {
    width: 100%;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #29292e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease-in-out;
}

.portal-gallery img:hover {
    transform: scale(2.0);
    /* Subtle zoom effect on hover */
}

.action-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn {
    text-decoration: none;
    padding: 14px 20px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.2s ease-in-out;
    text-align: center;
}

.btn-apply {
    background-color: #04d361;
    color: #121214;
    border: 1px solid #04d361;
}

.btn-apply:hover {
    background-color: #02b652;
    border-color: #02b652;
    transform: translateY(-1px);
}

.btn-login {
    background-color: #5865F2;
    color: #fff;
}

.btn-login:hover {
    background-color: #4752C4;
    transform: translateY(-1px);
}

/* ==========================================================================
   WAR ROOM SIGNUPS & ACTIONS (signup.php)
   ========================================================================== */
.grid-slot {
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
}

.grid-slot.moving-source-active {
    border: 2px solid #ff9000 !important;
    background: rgba(255, 144, 0, 0.1) !important;
    box-shadow: 0 0 10px rgba(255, 144, 0, 0.2);
}

.officer-panel-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 5000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.officer-modal-box {
    background: #202024;
    border: 1px solid #29292e;
    border-radius: 6px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.officer-modal-box h4 {
    margin-top: 0;
    font-size: 16px;
    color: #fff;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.proof-upload-box {
    background: #121214;
    border: 1px dashed #29292e;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    display: none;
}

.split-camp-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media(max-width: 768px) {
    .split-camp-panels {
        grid-template-columns: 1fr !important;
    }
}

.btn-action-override {
    background: #29292e !important;
    height: 40px !important;
    border: 1px solid #444 !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer;
    border-radius: 4px;
    padding: 0 16px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.15s, border-color 0.15s;
    margin-top: 0 !important;
}

.btn-action-override:hover {
    background: #35353c !important;
    border-color: #555 !important;
}

/* OVERLAY NEW BUTTON ATTENTION PULSE */
@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(225, 64, 64, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(225, 64, 64, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(225, 64, 64, 0);
    }
}

.needs-attention-btn {
    animation: pulse-red 2s infinite;
}

.nm-flex-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

@media(max-width: 768px) {
    .nm-flex-info {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   USER PROFILE SETTINGS (profile.php)
   ========================================================================== */
.profile-layout {
    background-color: #202024;
    border-radius: 8px;
    padding: 25px;
    border: 1px solid #29292e;
    max-width: 100%;
    margin: 20px auto;
}

.form-section {
    border-bottom: 1px solid #29292e;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.form-section h4 {
    margin-top: 0;
    color: #7159c1;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}

.input-group label {
    font-size: 12px;
    color: #8d8d99;
    font-weight: bold;
}

.profile-input,
.profile-select {
    background-color: #121214;
    border: 1px solid #29292e;
    color: #fff;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 13px;
    width: 100%;
}

.profile-input:focus,
.profile-select:focus {
    border-color: #5865F2;
    outline: none;
}

.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.checkbox-card {
    background-color: #121214;
    border: 1px solid #29292e;
    padding: 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.checkbox-card:hover {
    border-color: #3e3e44;
    background: #161618;
}

.checkbox-card input[type="checkbox"] {
    accent-color: #5865F2;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.checkbox-card span {
    font-size: 12px;
    font-weight: bold;
    color: #e1e1e6;
}

.toggle-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.save-profile-btn {
    background-color: #5865F2;
    color: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}

.save-profile-btn:hover {
    background-color: #4752c4;
}

.bedtime-selectors {
    display: flex;
    gap: 10px;
    align-items: center;
}

.bedtime-selectors select {
    flex: 1;
}

/* ==========================================================================
   POINTS LOG MATRIX (points_entry.php)
   ========================================================================== */
.points-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background-color: #202024;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #29292e;
}

.points-table th {
    background-color: #19191c;
    color: #8d8d99;
    text-align: left;
    padding: 14px 16px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #29292e;
    font-family: "Lucida Console", "Courier New", monospace;
}

.points-table td {
    padding: 14px 16px;
    color: #c4c4cc;
    border-bottom: 1px solid #29292e;
    font-size: 14px;
}

.points-table tr:last-child td {
    border-bottom: none;
}

.points-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
    color: #fff;
}

.filter-panel {
    background: #202024;
    border: 1px solid #29292e;
    padding: 16px;
    border-radius: 6px;
    display: flex;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 20px;
}

.action-link-btn {
    background: #29292e;
    color: #e1e1e6;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.15s ease;
    display: inline-block;
}

.action-link-btn:hover {
    background: #5865f2;
    color: #fff;
    border-color: #5865f2;
}

.badge-status {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
}

.badge-verified {
    background: rgba(4, 211, 97, 0.12);
    color: #04d361;
    border: 1px solid rgba(4, 211, 97, 0.2);
}

.badge-pending {
    background: rgba(255, 144, 0, 0.12);
    color: #ff9000;
    border: 1px solid rgba(255, 144, 0, 0.2);
}

/* ==========================================================================
   OFFICER SET POINT MATRIX (nm_points.php)
   ========================================================================== */
.matrix-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: #19191e;
    border: 1px solid #29292e;
    border-radius: 4px;
    overflow: hidden;
}

.matrix-table th {
    background: #202024;
    color: #8d8d99;
    font-size: 11px;
    text-transform: uppercase;
    text-align: left;
    padding: 12px;
    font-weight: bold;
    border-bottom: 2px solid #29292e;
}

.matrix-table td {
    padding: 10px 12px;
    font-size: 13px;
    color: #fff;
    border-bottom: 1px solid #29292e;
    vertical-align: middle;
}

.matrix-table tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

.inline-input {
    width: 75px;
    padding: 6px;
    background: #121214;
    border: 1px solid #29292e;
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    margin: 0;
}

.legend-card {
    background: #121214;
    border-left: 4px solid #5865f2;
    padding: 12px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 20px;
    font-size: 12px;
    line-height: 1.6;
    color: #c4c4cc;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.legend-badge {
    background: #19191e;
    padding: 4px 8px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #29292e;
    font-size: 11px;
}

/* ==========================================================================
   LEADERBOARDS STANDINGS (leaderboard.php)
   ========================================================================== */
.leaderboard-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 20px;
}

@media (max-width: 900px) {
    .leaderboard-container {
        grid-template-columns: 1fr;
    }
}

.board-card {
    background-color: #202024;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #29292e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.board-header {
    border-bottom: 2px solid #29292e;
    padding-bottom: 12px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.board-header h2 {
    margin: 0;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: bold;
}

.board-header .points-label {
    font-size: 11px;
    color: #8d8d99;
    background-color: #121214;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #29292e;
}

.search-container {
    margin-bottom: 20px;
    background-color: #202024;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #29292e;
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-input {
    background-color: #121214;
    border: 1px solid #29292e;
    color: #fff;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
    max-width: 400px;
}

.search-input:focus {
    border-color: #5865F2;
    outline: none;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.leaderboard-table th {
    color: #8d8d99;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    border-bottom: 1px solid #29292e;
}

.leaderboard-table td {
    padding: 12px;
    border-bottom: 1px solid #1a1a1c;
    font-size: 14px;
}

.leaderboard-table tr:hover {
    background-color: #29292e40;
}

.user-row {
    transition: background-color 0.15s ease;
}

.rank-col {
    font-weight: bold;
    color: #8d8d99;
    width: 40px;
    text-align: center;
}

.rank-top-1 {
    color: #ffd700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.4);
}

.rank-top-2 {
    color: #c0c0c0;
}

.rank-top-3 {
    color: #cd7f32;
}

.points-col {
    text-align: right;
    font-weight: bold;
    font-size: 16px;
}

.points-positive {
    color: #04d361;
}

.points-zero {
    color: #f75a68;
    opacity: 0.85;
    background-color: #f75a6810;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.mapping-badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #121214;
    border: 1px solid #29292e;
    color: #8d8d99;
    max-width: 150px;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mapping-missing {
    color: #ff9000;
    border-color: #ff900030;
    background-color: #ff900010;
}

.member-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.member-info .char-name {
    font-weight: bold;
    color: #fff;
}

.member-info .alt-info {
    font-size: 11px;
    color: #8d8d99;
}

/* ==========================================================================
   OFFICER SYNC CENTER (syncs.php)
   ========================================================================== */
.sync-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 15px;
}

@media (max-width: 900px) {
    .sync-grid {
        grid-template-columns: 1fr;
    }
}

.console-log {
    background-color: #121214;
    color: #04d361;
    font-family: monospace;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #29292e;
    height: 380px;
    overflow-y: auto;
    font-size: 11px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.sync-card {
    background-color: #202024;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #29292e;
    margin-bottom: 20px;
}

.sync-card h3 {
    margin-top: 0;
    color: #fff;
    border-bottom: 1px solid #29292e;
    padding-bottom: 10px;
    font-size: 16px;
    text-transform: uppercase;
}

.control-btns {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.sync-btn {
    background-color: #29292e;
    color: #fff;
    border: 1px solid #3e3e44;
    padding: 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sync-btn:hover {
    background-color: #5865F2;
    border-color: #5865F2;
    color: white;
}

.sync-btn-all {
    background-color: #7159c1;
    border-color: #7159c1;
}

.mapping-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: #1a1a1c;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #29292e;
}

.mapping-table th {
    background-color: #202024;
    color: #8d8d99;
    text-transform: uppercase;
    font-size: 11px;
    padding: 12px;
    text-align: left;
}

.mapping-table td {
    padding: 12px;
    border-bottom: 1px solid #242428;
    font-size: 13px;
    color: #e1e1e6;
}

.mapping-input {
    background-color: #121214;
    border: 1px solid #29292e;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    width: 100%;
    max-width: 180px;
}

.save-map-btn {
    background-color: #1f3a2b;
    color: #04d361;
    border: 1px solid #04d361;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
}

/* ==========================================================================
   ROSTER ACTIVITY TRACKER (activity.php)
   ========================================================================== */
.activity-container {
    background-color: #202024;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #29292e;
    margin-top: 20px;
}

.activity-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #1a1a1c;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #29292e;
}

.activity-table th {
    background-color: #202024;
    color: #8d8d99;
    text-transform: uppercase;
    font-size: 11px;
    padding: 12px;
    text-align: left;
}

.activity-table td {
    padding: 12px;
    border-bottom: 1px solid #242428;
    font-size: 13px;
    color: #e1e1e6;
}

.activity-table tr:hover {
    background-color: #202024;
}

.badge-counter {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    background-color: #29292e;
    color: #8d8d99;
}

.badge-counter.active-logs {
    background-color: rgba(4, 211, 97, 0.15);
    color: #04d361;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS FIXES (Profile Page)
   ========================================================================== */
@media (max-width: 768px) {

    /* Reduce global body padding */
    body.dashboard-page {
        padding: 10px;
    }

    /* Compress the profile card padding */
    .profile-layout {
        padding: 15px;
        margin: 10px auto;
    }

    /* Scale down the jobs grid to ensure two columns fit without overflowing */
    .jobs-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 8px;
    }

    /* Slightly shrink the checkbox cards for better mobile spacing */
    .checkbox-card {
        padding: 8px;
    }

    .checkbox-card span {
        font-size: 11px;
    }
}