/* ========================================
   This Is Me - KYC/AML Platform Styles
   ======================================== */

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
}

/* ---- Login ---- */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
}

.login-container { width: 400px; padding: 20px; }

.login-logo { text-align: center; color: white; margin-bottom: 30px; }
.login-logo h1 { font-size: 2.5rem; margin: 0; font-weight: 700; }
.login-logo p  { margin: 5px 0 0; opacity: 0.8; font-size: 1rem; }

.login-form .ui-panel {
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.login-btn {
    margin-top: 15px;
    background-color: #1a237e !important;
    border-color: #1a237e !important;
    font-size: 1rem;
    padding: 12px !important;
    width: 100%;
}

.login-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

/* ---- Layout ---- */
.layout-wrapper { display: flex; min-height: 100vh; }

.layout-sidebar {
    width: 240px;
    background: linear-gradient(180deg, #1a237e 0%, #1e2d8f 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);
    z-index: 100;
}

.layout-main {
    margin-left: 240px;
    flex: 1;
    padding: 24px;
}

.layout-header {
    background: white;
    padding: 14px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-radius: 6px;
}

.layout-header h2 { margin: 0; font-size: 1.25rem; color: #1a237e; font-weight: 600; }

/* ---- Sidebar Logo ---- */
.sidebar-logo {
    padding: 22px 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    flex-shrink: 0;
}

.sidebar-logo h2 {
    margin: 0 0 2px;
    font-size: 1.15rem;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.sidebar-logo small {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* ---- Sidebar Navigation ---- */
.sidebar-nav {
    list-style: none !important;
    margin: 10px 0;
    padding: 0;
    flex: 1;
}

.sidebar-nav li {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

/* The key override — higher specificity than PrimeFaces Saga theme's `a` rule */
.layout-sidebar .sidebar-nav li a,
.layout-sidebar .sidebar-nav li a:link,
.layout-sidebar .sidebar-nav li a:visited {
    display: flex !important;
    align-items: center !important;
    gap: 11px !important;
    padding: 10px 18px !important;
    margin: 1px 8px !important;
    border-radius: 6px !important;
    color: rgba(255,255,255,0.75) !important;
    text-decoration: none !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    transition: background 0.15s, color 0.15s !important;
    border-left: none !important;
}

.layout-sidebar .sidebar-nav li a i {
    font-size: 0.95rem !important;
    width: 18px !important;
    text-align: center !important;
    flex-shrink: 0 !important;
    color: rgba(255,255,255,0.6) !important;
}

.layout-sidebar .sidebar-nav li a:hover,
.layout-sidebar .sidebar-nav li a:focus {
    background: rgba(255,255,255,0.1) !important;
    color: #fff !important;
    outline: none !important;
}

.layout-sidebar .sidebar-nav li a:hover i,
.layout-sidebar .sidebar-nav li a:focus i {
    color: #fff !important;
}

.layout-sidebar .sidebar-nav li a.active {
    background: rgba(255,255,255,0.18) !important;
    color: #fff !important;
    font-weight: 600 !important;
}

.layout-sidebar .sidebar-nav li a.active i {
    color: #fff !important;
}

/* Separator — empty li rendered as a horizontal divider */
.sidebar-nav li.sidebar-separator {
    height: 1px !important;
    background: rgba(255,255,255,0.12) !important;
    margin: 8px 18px !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* ---- Form Helpers ---- */
.full-width { width: 100% !important; }

.form-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.form-col-grow { flex: 1; }
.form-col-auto { flex: none; }

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ---- Dialog ---- */
.dialog-form { padding: 4px 0 8px; }
.dialog-form label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 4px;
}

/* ---- Stats / Cards ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon { flex-shrink: 0; opacity: 0.85; }
.stat-body { flex: 1; min-width: 0; }
.stat-label { font-size: 0.78rem; color: #888; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.stat-value { font-size: 1.05rem; font-weight: 600; color: #333; }
.stat-number { font-size: 2rem; font-weight: 700; color: #1a237e; line-height: 1; }
.stat-sub { font-size: 0.75rem; color: #aaa; margin-top: 2px; }

/* Dashboard cards (manager) */
.dashboard-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    margin-bottom: 16px;
    text-align: center;
}

/* ---- Risk / Status ---- */
.risk-green  { color: #2e7d32; font-weight: bold; }
.risk-orange { color: #e65100; font-weight: bold; }
.risk-red    { color: #c62828; font-weight: bold; }

.status-pending  { color: #f57c00; }
.status-approved { color: #2e7d32; }
.status-rejected { color: #c62828; }

/* ---- Language switcher ---- */
.lang-form { padding: 0 20px 10px; }
.lang-btn.ui-button {
    background: transparent !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    color: rgba(255,255,255,0.55) !important;
    font-size: 0.7rem !important;
    padding: 2px 8px !important;
    margin-right: 4px !important;
    min-width: 0 !important;
    height: auto !important;
}
.lang-btn.lang-active.ui-button {
    background: rgba(255,255,255,0.18) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.5) !important;
    font-weight: 600 !important;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .layout-sidebar { display: none; }
    .layout-main { margin-left: 0; }
    .form-grid { grid-template-columns: 1fr; }
}
