/* ==============================================================
   WISMA ATRIA FCC PORTAL - SOFT LIGHT THEME
   ============================================================== */

:root {
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    
    --accent-emerald: #059669;
    --accent-brown: #854d0e;
    --accent-yellow: #a16207;
    --accent-purple: #7e22ce;
    --accent-blue: #0284c7;
    --accent-rose: #e11d48;
    
    --text-main: #000000;
    --text-sub: #334155;
}

* {
    box-sizing: border-box;
    margin: 0; 
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh; 
    width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
}

/* LANDSCAPE ORIENTATION NOTICE */
.landscape-overlay { display: none; }

@media screen and (orientation: landscape) and (max-height: 550px) {
    .landscape-overlay {
        display: flex !important; 
        position: fixed; 
        top: 0; left: 0; 
        width: 100vw; height: 100vh;
        background: #0f172a; 
        z-index: 999999; 
        color: #f8fafc; 
        flex-direction: column;
        align-items: center; 
        justify-content: center; 
        text-align: center; 
        padding: 20px;
    }
    .landscape-overlay h2 { font-size: 1.2rem; margin-bottom: 6px; color: #38bdf8; }
    .landscape-overlay p { font-size: 0.85rem; color: #94a3b8; max-width: 320px; }
}

/* HEADER BAR */
header {
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; 
    z-index: 100;
    background: rgba(255, 255, 255, 0.96); 
    backdrop-filter: blur(14px); 
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid #e2e8f0;
    padding-top: max(8px, env(safe-area-inset-top)); 
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-inner {
    width: 100%; 
    max-width: 440px; 
    margin: 0 auto; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 6px 10px 8px 10px;
    position: relative;
}

.header-title-container {
    text-align: center; 
    flex: 1; 
    overflow: hidden;
}

header h1 {
    font-size: 0.96rem; 
    font-weight: 800; 
    line-height: 1.2;
    background: linear-gradient(135deg, #0369a1, #4338ca);
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    margin: 0 0 3px 0;
}

.header-status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-wrap: nowrap;
    overflow: hidden;
    width: 100%;
}

.status-pill {
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    line-height: 1.15;
    white-space: nowrap;
    flex-shrink: 0;
}
.pill-officer {
    color: #0369a1;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
}
.pill-location {
    color: #065f46;
    background: #d1fae5;
    border: 1px solid #a7f3d0;
}
.pill-online {
    color: #065f46;
    background: #d1fae5;
    border: 1px solid #a7f3d0;
}
.pill-offline {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fca5a5;
}

.logout-btn, .settings-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    text-decoration: none;
    font-size: 1.05rem;
    color: #0284c7;
    flex-shrink: 0;
}
.logout-btn { border-color: #fecdd3; }
.logout-btn:active, .settings-btn:active { transform: scale(0.92); }

/* MAIN CONTENT WRAPPER */
.wrapper {
    width: 100%; 
    max-width: 480px; 
    margin: 0 auto; 
    padding: 0 12px 24px 12px;
    padding-top: calc(86px + max(12px, env(safe-area-inset-top))) !important;
    display: flex; 
    flex-direction: column; 
    min-height: 100vh;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
}

/* 2 PLACARDS PER ROW GRID LAYOUT */
.cards-container { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px; 
    width: 100%; 
}

/* HERO CARDS */
.hero-card {
    background: var(--card-bg); 
    border: 1px solid var(--card-border); 
    border-radius: 12px;
    padding: 11px 11px 13px 11px; 
    display: flex; 
    flex-direction: column;
    justify-content: space-between; 
    gap: 6px; 
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    position: relative; 
    overflow: hidden; 
}

.hero-card.emerald::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--accent-emerald); }
.hero-card.brown::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--accent-brown); }
.hero-card.yellow::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--accent-yellow); }
.hero-card.purple::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--accent-purple); }
.hero-card.blue::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--accent-blue); }
.hero-card.rose::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--accent-rose); }

/* HORIZONTAL FULL-WIDTH SETTINGS CARD */
.horizontal-admin-card {
    grid-column: 1 / -1 !important;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.hero-card.slate::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #0284c7, #4f46e5);
}

.horizontal-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
}

.horizontal-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.admin-icon-box {
    font-size: 1.8rem;
    line-height: 1;
    flex-shrink: 0;
}

.slate-text {
    color: #475569 !important;
    font-size: 0.65rem;
    font-weight: 700;
}

.btn-slate {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.3);
}

.horizontal-open-btn {
    width: auto !important;
    min-width: 85px !important;
    padding: 7px 14px !important;
    margin-top: 0 !important;
    white-space: nowrap;
}

.card-top { display: flex; align-items: flex-start; gap: 6px; }
.icon-box { font-size: 1.35rem; line-height: 1; flex-shrink: 0; }
.card-title-group { flex: 1; }

.card-title-group h2 { font-size: 0.9rem; font-weight: 800; color: #000000; line-height: 1.2; letter-spacing: -0.1px; }
.card-title-group span { font-size: 0.64rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; display: block; margin-top: 2px; }

.emerald-text { color: #047857 !important; }
.brown-text { color: #854d0e !important; }
.yellow-text { color: #a16207 !important; }
.purple-text { color: #6b21a8 !important; }
.blue-text { color: #0369a1 !important; }
.rose-text { color: #be123c !important; }

.card-description { font-size: 0.74rem; color: #334155; line-height: 1.3; font-weight: 500; }

/* BUTTONS */
.btn {
    width: 100%; 
    min-height: 34px; 
    color: #ffffff; 
    border: none; 
    border-radius: 8px;
    font-size: 0.78rem; 
    font-weight: 700; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    gap: 4px; 
    cursor: pointer; 
    text-decoration: none; 
    padding: 6px 10px; 
    margin-top: 4px;
}

.btn-emerald { background: linear-gradient(135deg, #059669, #10b981); }
.btn-brown { background: linear-gradient(135deg, #78350f, #a16207); }
.btn-yellow { background: linear-gradient(135deg, #b45309, #d97706); }
.btn-purple { background: linear-gradient(135deg, #6b21a8, #9333ea); }
.btn-blue { background: linear-gradient(135deg, #0369a1, #0284c7); }
.btn-rose { background: linear-gradient(135deg, #be123c, #e11d48); }

/* FOOTER */
footer { 
    text-align: center; 
    color: #475569; 
    font-size: 0.72rem; 
    font-weight: 600;
    margin-top: auto; 
    padding-top: 16px; 
    padding-bottom: 8px; 
}

/* MODALS & OVERLAYS */
.modal-overlay {
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6); 
    backdrop-filter: blur(6px); 
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 12px;
}

.modal-card {
    background: #ffffff; 
    border: 1px solid #cbd5e1; 
    border-radius: 16px;
    padding: 16px 14px; 
    width: 100%; 
    max-width: 440px; 
    height: 82vh; 
    max-height: 82vh;
    margin-top: env(safe-area-inset-top); 
    display: flex; 
    flex-direction: column;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2); 
    overflow: hidden;
}

.modal-card h2 { font-size: 1.1rem; color: #000000; font-weight: 800; margin-bottom: 2px; text-align: center; }
.modal-card p { font-size: 0.78rem; color: #334155; margin-bottom: 8px; text-align: center; line-height: 1.35; }

/* FORMS & INPUTS */
.input-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; text-align: left; }
.input-group label { font-size: 0.7rem; font-weight: 800; color: #0369a1; text-transform: uppercase; letter-spacing: 0.4px; }

.input-group input, .input-group select, .search-box input {
    width: 100%; 
    height: 40px; 
    background: #f8fafc; 
    border: 1.5px solid #cbd5e1;
    border-radius: 8px; 
    padding: 0 10px; 
    color: #000000; 
    font-size: 16px !important; 
    font-weight: 600;
    outline: none;
}

.force-upper { text-transform: uppercase; }

.status-box { font-size: 0.78rem; padding: 8px 10px; border-radius: 6px; margin-bottom: 12px; display: none; line-height: 1.35; }
.status-box.error { background: #fee2e2; border: 1px solid #f87171; color: #991b1b; display: block; }
.status-box.info { background: #e0f2fe; border: 1px solid #38bdf8; color: #0369a1; display: block; }

.btn-submit {
    background: linear-gradient(135deg, #0369a1, #0284c7); 
    width: 100%; 
    height: 40px;
    border: none; 
    border-radius: 8px; 
    color: #ffffff; 
    font-weight: 800; 
    font-size: 0.88rem;
    cursor: pointer; 
    box-shadow: 0 3px 8px rgba(2, 132, 199, 0.25);
}

.badge-role-admin {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    font-size: 0.66rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* FLOATING HOTLINE SPEED DIAL BUTTON */
.fab-speed-dial {
    position: fixed;
    bottom: 22px;
    right: 18px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: 2px solid #ffffff;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 1000;
}