* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: #f5f6fa; color: #333; }

/* Login Hero */
.login-page {
    height: 100vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(0,24,75,0.9) 0%, rgba(0,13,40,0.85) 100%);
}
.login-container { position: relative; z-index: 1; width: 100%; max-width: 420px; padding: 1rem; }
.login-card {
    background: white; border-radius: 16px; padding: 2.5rem;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    animation: fadeUp 0.5s ease;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.login-header { text-align: center; margin-bottom: 2rem; }
.login-header h1 { font-size: 1.5rem; color: #00184b; margin-bottom: 0.25rem; }
.login-header p { color: #666; font-size: 0.9rem; }
.login-form .form-group { margin-bottom: 1.25rem; }
.login-form label { display: block; font-size: 0.85rem; font-weight: 600; color: #444; margin-bottom: 0.4rem; }
.login-form label i { width: 18px; color: #00184b; }
.login-form input {
    width: 100%; padding: 0.75rem 1rem; border: 2px solid #e0e0e0; border-radius: 8px;
    font-size: 0.95rem; transition: all 0.3s;
}
.login-form input:focus { outline: none; border-color: #00184b; box-shadow: 0 0 0 3px rgba(0,24,75,0.1); }
.btn-login {
    width: 100%; padding: 0.85rem; background: #00184b; color: white; border: none;
    border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer;
    transition: all 0.3s; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.btn-login:hover { background: #000d28; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,24,75,0.3); }
.login-footer { text-align: center; margin-top: 1.5rem; }
.login-footer a { color: #666; text-decoration: none; font-size: 0.9rem; }
.login-footer a:hover { color: #00184b; }
.alert {
    padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1.25rem;
    font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem;
}
.alert-error { background: #fef2f2; color: #c62828; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #2e7d32; border: 1px solid #bbf7d0; }

/* Dashboard Layout */
.dash-layout { display: flex; min-height: 100vh; }
.dash-sidebar {
    width: 250px; background: #00184b; color: white; display: flex;
    flex-direction: column; position: fixed; height: 100vh; z-index: 100;
}
.sidebar-brand { padding: 1.25rem; display: flex; align-items: center; gap: 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.1); font-weight: 700; font-size: 1rem; }
.sidebar-nav { flex: 1; padding: 1rem 0; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.25rem;
    color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.9rem; font-weight: 500;
    transition: all 0.2s; border-left: 3px solid transparent;
}
.sidebar-nav a:hover, .sidebar-nav a.active { background: rgba(255,255,255,0.1); color: white; border-left-color: #d4a017; }
.sidebar-user {
    padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: space-between;
}
.user-info strong { display: block; font-size: 0.85rem; }
.user-info small { font-size: 0.75rem; color: rgba(255,255,255,0.6); }
.logout-btn { color: rgba(255,255,255,0.6); font-size: 1.1rem; transition: all 0.2s; }
.logout-btn:hover { color: #ff6b6b; }

.dash-main { margin-left: 250px; flex: 1; padding: 2rem; }
.dash-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid #e5e5e5;
}
.dash-header h2 { font-size: 1.5rem; color: #00184b; }
.header-date { color: #999; font-size: 0.9rem; }

/* Stats */
.row { display: flex; gap: 1.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.col-2 { flex: 1; min-width: 300px; }
.col-3 { flex: 1; min-width: 200px; }
.stat-card {
    background: white; border-radius: 12px; padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); border-top: 4px solid;
}
.stat-card.primary { border-top-color: #00184b; }
.stat-card.success { border-top-color: #2e7d32; }
.stat-card.accent { border-top-color: #d4a017; }
.stat-card.info { border-top-color: #0284c7; }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 1rem; }
.stat-card.primary .stat-icon { background: rgba(0,24,75,0.1); color: #00184b; }
.stat-card.success .stat-icon { background: rgba(46,125,50,0.1); color: #2e7d32; }
.stat-card.accent .stat-icon { background: rgba(212,160,23,0.1); color: #d4a017; }
.stat-card.info .stat-icon { background: rgba(2,132,199,0.1); color: #0284c7; }
.stat-value { font-size: 2rem; font-weight: 700; color: #111; }
.stat-label { font-size: 0.9rem; color: #666; margin-bottom: 0.25rem; }
.stat-card small { color: #999; font-size: 0.8rem; }

/* Charts */
.charts-row { margin-bottom: 1.5rem; }
.card-chart {
    background: white; border-radius: 12px; padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.card-chart h4 { margin-bottom: 1rem; color: #00184b; font-size: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.card-chart canvas { max-height: 250px; }

/* Tables */
.card-table {
    background: white; border-radius: 12px; padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.card-table h4 { margin-bottom: 1rem; color: #00184b; font-size: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.card-table table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.card-table th { text-align: left; padding: 0.75rem 0.5rem; border-bottom: 2px solid #e5e5e5; color: #666; font-weight: 600; font-size: 0.8rem; text-transform: uppercase; }
.card-table td { padding: 0.75rem 0.5rem; border-bottom: 1px solid #f0f0f0; }
.card-table tr:hover td { background: #f9fafb; }
.msg-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #666; }

/* Toolbar */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem; }
.search-form { display: flex; gap: 0; }
.search-form input {
    padding: 0.6rem 1rem; border: 2px solid #e0e0e0; border-radius: 8px 0 0 8px;
    font-size: 0.9rem; width: 280px;
}
.search-form input:focus { outline: none; border-color: #00184b; }
.search-form button {
    padding: 0.6rem 1rem; background: #00184b; color: white; border: none;
    border-radius: 0 8px 8px 0; cursor: pointer;
}
.total-count { font-size: 0.85rem; color: #999; }

/* Badges */
.badge { display: inline-block; padding: 0.25rem 0.6rem; border-radius: 50px; font-size: 0.75rem; font-weight: 600; }
.badge-company { background: rgba(0,24,75,0.1); color: #00184b; }
.badge-individual { background: rgba(212,160,23,0.1); color: #b8860b; }
.badge-super { background: rgba(212,160,23,0.15); color: #b8860b; }
.badge-admin { background: rgba(0,24,75,0.1); color: #00184b; }
.badge-active { background: rgba(46,125,50,0.1); color: #2e7d32; }
.badge-inactive { background: rgba(198,40,40,0.1); color: #c62828; }

/* Pagination */
.pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1.5rem; }
.pagination a {
    padding: 0.5rem 0.85rem; border: 1px solid #e0e0e0; border-radius: 6px;
    text-decoration: none; color: #666; font-size: 0.85rem; transition: all 0.2s;
}
.pagination a.active, .pagination a:hover { background: #00184b; color: white; border-color: #00184b; }

/* User form */
.user-form .form-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.user-form input, .user-form select {
    padding: 0.6rem 1rem; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 0.9rem; flex: 1; min-width: 150px;
}
.user-form input:focus, .user-form select:focus { outline: none; border-color: #00184b; }
.btn-create {
    padding: 0.6rem 1.25rem; background: #00184b; color: white; border: none;
    border-radius: 8px; cursor: pointer; font-weight: 600; transition: all 0.2s;
    display: flex; align-items: center; gap: 0.4rem;
}
.btn-create:hover { background: #000d28; }
.actions-cell { white-space: nowrap; }
.btn-action {
    padding: 0.4rem 0.6rem; border: 1px solid #e0e0e0; border-radius: 6px;
    background: white; cursor: pointer; color: #666; transition: all 0.2s;
}
.btn-action:hover { background: #f0f0f0; color: #00184b; }
.btn-danger:hover { color: #c62828; border-color: #fecaca; }

/* Responsive */
@media (max-width: 768px) {
    .dash-sidebar { width: 60px; }
    .dash-sidebar .sidebar-brand span,
    .dash-sidebar .sidebar-nav a span,
    .dash-sidebar .user-info { display: none; }
    .dash-sidebar .sidebar-nav a { justify-content: center; padding: 0.75rem; }
    .dash-main { margin-left: 60px; padding: 1rem; }
    .row { flex-direction: column; }
    .col-2, .col-3 { min-width: 100%; }
    .search-form input { width: 180px; }
}
