/* DSC Portal - District & Sessions Court Quetta */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f0f4f8;
    color: #2d3748;
    font-size: 14px;
}

/* ===== HEADER ===== */
.site-header {
    background: linear-gradient(135deg, #1a3a5c 0%, #2d6a9f 100%);
    color: #fff;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.header-top {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    gap: 16px;
}
.header-logo {
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}
.header-text h1 { font-size: 18px; font-weight: 700; }
.header-text p  { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.header-nav {
    background: rgba(0,0,0,0.2);
    padding: 8px 24px;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}
.header-nav a {
    color: #fff;
    text-decoration: none;
    padding: 5px 14px;
    border-radius: 4px;
    font-size: 13px;
    transition: background 0.2s;
}
.header-nav a:hover { background: rgba(255,255,255,0.15); }
.header-nav .btn-logout {
    background: #c0392b;
    padding: 5px 14px;
    border-radius: 4px;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 960px;
    margin: 24px auto;
    padding: 0 16px;
}
.container-wide {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 16px;
}

/* ===== CARDS ===== */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 24px;
    margin-bottom: 20px;
}
.card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a3a5c;
    border-bottom: 2px solid #2d6a9f;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* ===== FORMS ===== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}
.form-full { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.form-group input,
.form-group select,
.form-group textarea {
    padding: 9px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 5px;
    font-size: 14px;
    color: #2d3748;
    background: #fff;
    transition: border 0.2s;
    width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2d6a9f;
    box-shadow: 0 0 0 3px rgba(45,106,159,0.12);
}
.form-group textarea { resize: vertical; min-height: 70px; }

.radio-group { display: flex; gap: 16px; flex-wrap: wrap; padding: 6px 0; }
.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    font-size: 14px;
    color: #2d3748;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    text-align: center;
}
.btn-primary { background: #2d6a9f; color: #fff; }
.btn-primary:hover { background: #1a3a5c; }
.btn-success { background: #27ae60; color: #fff; }
.btn-success:hover { background: #1e8449; }
.btn-danger  { background: #c0392b; color: #fff; }
.btn-danger:hover  { background: #922b21; }
.btn-warning { background: #f39c12; color: #fff; }
.btn-warning:hover { background: #d68910; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-block { display: block; width: 100%; }

/* ===== TABLES ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
table th {
    background: #1a3a5c;
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
}
table td { padding: 10px 12px; border-bottom: 1px solid #e2e8f0; }
table tr:hover td { background: #f7fafc; }

/* ===== LOGIN PAGE ===== */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a3a5c 0%, #2d6a9f 100%);
    padding: 20px;
}
.login-box {
    background: #fff;
    border-radius: 10px;
    padding: 36px 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.login-logo {
    text-align: center;
    margin-bottom: 24px;
}
.login-logo .icon { font-size: 48px; }
.login-logo h2 { font-size: 18px; color: #1a3a5c; margin-top: 8px; font-weight: 700; }
.login-logo p  { font-size: 12px; color: #718096; margin-top: 4px; }

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}
.badge-success  { background: #d4edda; color: #155724; }
.badge-warning  { background: #fff3cd; color: #856404; }
.badge-danger   { background: #f8d7da; color: #721c24; }
.badge-primary  { background: #cce5ff; color: #004085; }
.badge-info     { background: #d1ecf1; color: #0c5460; }

/* ===== SECTION TITLES ===== */
.section-title {
    background: #eef2f7;
    border-left: 4px solid #2d6a9f;
    padding: 8px 14px;
    margin: 20px 0 14px;
    font-weight: 700;
    font-size: 13px;
    color: #1a3a5c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 0 4px 4px 0;
}

/* ===== PHOTO UPLOAD ===== */
.photo-upload-box {
    width: 120px;
    height: 140px;
    border: 2px dashed #cbd5e0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    cursor: pointer;
    overflow: hidden;
    background: #f7fafc;
    margin-bottom: 8px;
}
.photo-upload-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-upload-box .placeholder { color: #a0aec0; font-size: 12px; text-align: center; padding: 10px; }

/* ===== POST CARDS ===== */
.post-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    background: #fff;
    transition: box-shadow 0.2s;
}
.post-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.post-info h3 { font-size: 16px; color: #1a3a5c; font-weight: 700; }
.post-info p  { font-size: 13px; color: #718096; margin-top: 4px; }
.post-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* ===== STEPS ===== */
.steps { display: flex; gap: 0; margin-bottom: 24px; }
.step {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    background: #e2e8f0;
    color: #718096;
    font-size: 12px;
    font-weight: 600;
    position: relative;
}
.step.active { background: #2d6a9f; color: #fff; }
.step.done   { background: #27ae60; color: #fff; }

/* ===== AFFIDAVIT ===== */
.affidavit-box {
    background: #fffbf0;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 16px 20px;
    font-size: 13px;
    line-height: 1.7;
}

/* ===== ADMIN SIDEBAR ===== */
.admin-layout { display: flex; min-height: calc(100vh - 80px); }
.sidebar {
    width: 220px;
    background: #1a3a5c;
    flex-shrink: 0;
    padding: 16px 0;
}
.sidebar a {
    display: block;
    padding: 11px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.sidebar a:hover, .sidebar a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-left-color: #2d6a9f;
}
.sidebar .nav-heading {
    padding: 8px 20px;
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 8px;
}
.admin-content { flex: 1; padding: 24px; background: #f0f4f8; overflow-x: hidden; }

/* ===== STAT CARDS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid #2d6a9f;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.stat-card .num { font-size: 28px; font-weight: 700; color: #1a3a5c; }
.stat-card .lbl { font-size: 12px; color: #718096; font-weight: 600; }

/* ===== ALERTS ===== */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 14px; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger  { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

/* ===== MISC ===== */
.text-muted  { color: #718096; }
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; }

@media (max-width: 700px) {
    .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .admin-layout { flex-direction: column; }
    .sidebar { width: 100%; }
}
