/* ==========================================================================
   DIGILOCKER PORTAL - GLOBAL STYLESHEET & SCROLLBAR OVERRIDES
   ========================================================================== */

:root {
    --bg-canvas: #0f0f11;
    --accent: #007acc;
    --card-bg: #141417;
    --border: #24242b;
    --text-muted: #72727e;
    --text-main: #ffffff;
}

html::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
html::-webkit-scrollbar-track {
    background: #0f0f11;
}
html::-webkit-scrollbar-thumb {
    background: #24242b;
    border-radius: 4px;
}
html::-webkit-scrollbar-thumb:hover {
    background: #3e3e4a;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-canvas);
    color: var(--text-main);
    margin: 0;
    padding: 40px 20px;
    min-height: 100vh;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden;
}

.container { 
    width: 100%; 
    max-width: 1040px; 
}
/* --- LOGIN MODULE --- */
.login-wrapper { 
    min-height: 80vh; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    width: 100%; 
}
.login-card {
    background-color: var(--card-bg); 
    padding: 45px 40px; 
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.7); 
    width: 100%;
    max-width: 360px; 
    border: 1px solid var(--border); 
    text-align: center;
}
.login-title { 
    margin: 0 0 5px 0; 
    font-size: 20px; 
    font-weight: 900; /* Forces heaviest variant available */
    font-family: "Futura-Bold", Futura, "Futura Heavy", "Century Gothic", sans-serif;
    text-transform: uppercase; /* Automatically capitalises all text */
    letter-spacing: 0.5px;
    color: var(--text-main) !important; 
}
.login-subtitle { 
    margin: 0 0 30px 0; 
    color: var(--text-muted) !important; /* Force explicit text color visibility */
    font-size: 14px; 
}

input[type="text"], input[type="password"] {
    width: 100%; 
    padding: 14px; 
    background-color: #0b0b0d;
    border: 1px solid var(--border); 
    border-radius: 8px; 
    color: var(--text-main);
    font-size: 16px; 
    box-sizing: border-box; 
    margin-bottom: 15px;
}
input:focus { 
    border-color: var(--accent); 
    outline: none; 
}
button {
    width: 100%; 
    padding: 14px; 
    background-color: var(--accent); 
    color: #ffffff !important; /* Ensure high-contrast text label */
    border: none; 
    border-radius: 8px; 
    font-size: 16px; 
    font-weight: bold;
    cursor: pointer; 
    margin-top: 10px;
}
.error { 
    color: #ff4d4d; 
    font-size: 14px; 
    margin-top: 15px; 
}

/* --- HEADER & BRANDING --- */
.portal-header { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    margin-bottom: 40px; 
}
.brand-meta { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
}
.brand-logo { 
    width: 60px; 
    height: 60px; 
    object-fit: contain; 
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5)); 
}
.welcome-title { 
    margin: 0; 
    font-size: 26px; 
    font-weight: 900; 
    font-family: "Futura-Bold", Futura, "Futura Heavy", "Century Gothic", sans-serif;
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
}

.welcome-subtitle { 
    margin: 3px 0 0 0; 
    color: #8e8e9a; 
    font-size: 14px; 
    font-weight: 500; 
}

/* --- SECTIONS --- */
.section-row { 
    margin-bottom: 45px; 
}
.section-title {
    text-align: left; 
    font-size: 14px; 
    font-weight: 900; 
    font-family: "Futura-Bold", Futura, "Futura Heavy", "Century Gothic", sans-serif;
    text-transform: uppercase; /* Kept capitalised as requested */
    letter-spacing: 1.5px; 
    color: var(--text-muted); 
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px; 
    margin-bottom: 20px;
}

/* --- QUICK ACCESS DOCK (RECENT) --- */
.recent-track {
    display: flex; 
    gap: 12px; 
    overflow-x: auto; 
    overflow-y: hidden; 
    padding-bottom: 35px; 
    margin-bottom: -20px; 
}

/* Force hide all horizontal track scrollbars unless they overflow */
.recent-track::-webkit-scrollbar {
    height: 4px;
}
.recent-track::-webkit-scrollbar-track {
    background: transparent;
}
.recent-track::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.recent-card-mini {
    background: var(--card-bg); 
    width: 48px; 
    height: 48px; 
    min-width: 48px; 
    border-radius: 10px; 
    border: 1px solid var(--border); 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    transition: all 0.2s ease; 
    position: relative;
    text-decoration: none;
}
.recent-card-mini:hover { 
    border-color: var(--accent); 
    background: #1e1e24; /* Smoothly lights up the card background instead of scaling */
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.4); /* Adds depth safely inside the track spacing */
}

.recent-icon-mini { 
    width: 24px; 
    height: 24px; 
    object-fit: contain; 
}
.recent-svg-fallback {
    flex-shrink: 0;
}

/* RECENT DOCK TOOLTIPS */
.recent-card-mini::after {
    content: attr(data-title); 
    position: absolute; 
    bottom: -32px; 
    left: 50%;
    transform: translateX(-50%); 
    background: #1c1c22; 
    color: #fff; 
    font-size: 11px;
    font-weight: 600; 
    padding: 4px 8px; 
    border-radius: 6px; 
    border: 1px solid var(--border);
    white-space: nowrap; 
    opacity: 0; 
    pointer-events: none; 
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5); 
    transition: opacity 0.15s ease;
}
.recent-card-mini:hover::after { 
    opacity: 1; 
}

/* --- 3-COLUMN LIST MATRIX --- */
.grid-matrix { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 16px; 
}
.horizontal-card {
    background-color: var(--card-bg); 
    border: 1px solid var(--border); 
    border-radius: 12px;
    text-decoration: none; 
    color: var(--text-main); 
    display: flex;
    align-items: center; 
    gap: 16px; 
    padding: 16px; 
    box-sizing: border-box; 
    transition: all 0.2s ease;
}
.horizontal-card:hover { 
    transform: translateY(-2px); 
    border-color: var(--accent); 
    background: #18181c; 
}
.card-meta { 
    display: flex; 
    flex-direction: column; 
    text-align: left; 
}
.matrix-icon { 
    width: 44px; 
    height: 44px; 
    object-fit: contain; 
    flex-shrink: 0; 
}
.matrix-title { 
    font-size: 15px; 
    font-weight: 600; 
    margin: 0 0 2px 0; 
}
.matrix-version { 
    color: var(--text-muted); 
    font-size: 12px; 
    margin: 0; 
}

/* --- ACTIONS --- */
.logout-link { 
    color: var(--text-muted); 
    text-decoration: none; 
    font-size: 14px; 
    font-weight: 600; 
    padding: 8px 16px; 
    border-radius: 6px; 
    border: 1px solid var(--border); 
    transition: all 0.2s; 
}
.logout-link:hover { 
    color: #ff4d4d; 
    border-color: #ff4d4d; 
}
.empty-placeholder { 
    color: var(--text-muted); 
    font-style: italic; 
    font-size: 14px; 
    text-align: left; 
    padding: 5px 0; 
}

.category-svg-fallback {
    width: 44px;
    height: 44px;
    color: var(--accent);
    opacity: 0.85;
    flex-shrink: 0;
}
