/* ==========================================================================
   NTMS Custom Adjustments over Gentelella v4
   ========================================================================== */

/* === NTMS Brand Accent Adjustments === */
:root {
    --ntms-navy: #1a2a6c;
    --ntms-gold: #c9a14a;
}

/* === Exam Sticky Bar === */
.ntms-exam-bar {
    position: sticky;
    top: 56px;
    z-index: 30;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.ntms-timer {
    font-family: monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--red);
    background: var(--red-lt);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
}

/* === Assessment Option Buttons === */
.ntms-opts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.ntms-opt-btn {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text);
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.15s ease;
}

.ntms-opt-btn:hover {
    border-color: var(--primary);
    background: var(--primary-lt);
}

.ntms-opt-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    font-weight: 600;
}

/* === LJK Entry Grid === */
.ntms-ljk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 10px;
}

.ntms-ljk-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ntms-ljk-cell label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.ntms-ljk-cell input {
    width: 42px;
    height: 42px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
}

/* === User Menu Dropdown === */
.gt-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 200px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    z-index: 100;
    overflow: hidden;
}

.gt-dropdown-menu.show {
    display: block;
}

.gt-dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color-light);
    font-size: 13px;
}

.gt-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s ease;
}

.gt-dropdown-item:hover {
    background: var(--body-bg);
}

.gt-dropdown-item--danger {
    color: var(--red);
}

.gt-dropdown-item--danger:hover {
    background: var(--red-lt);
}

/* === Responsive Mobile Card Table (No Double Wrap) === */
@media (max-width: 768px) {
    /* Flatten outer card wrapper on mobile */
    .card:has(.table-mobile-card) {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .card:has(.table-mobile-card) .card-header {
        background: var(--bg-surface);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
        margin-bottom: 12px;
    }
    
    .card:has(.table-mobile-card) .card-body {
        padding: 0 !important;
        background: transparent !important;
    }

    .table-mobile-card,
    .table-mobile-card tbody,
    .table-mobile-card tr,
    .table-mobile-card td {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
    }
    
    .table-mobile-card thead {
        display: none;
    }
    
    .table-mobile-card tbody tr {
        background: var(--bg-surface);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
        margin: 0 0 12px 0 !important;
        padding: 14px 16px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    }
    
    .table-mobile-card td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px dashed var(--border-color-light);
        text-align: right;
    }
    
    .table-mobile-card td:last-child {
        border-bottom: none;
        padding-top: 12px;
        margin-top: 4px;
        justify-content: flex-end;
    }
    
    .table-mobile-card td[data-label]::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 11.5px;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.3px;
        text-align: left;
        margin-right: 12px;
        flex-shrink: 0;
    }
}
