* {
    box-sizing: border-box;
}

:root {
    --navy: #0c233a;
    --navy2: #132f4c;
    --gold: #c2a05c;
    --blue: #123f78;
    --bg: #f1f5f9;
    --white: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --shadow: 0 4px 18px rgba(12, 35, 58, .06);
    --radius: 12px;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* PANEL WRAP */
.admin-wrap {
    max-width: 1320px;
    margin: 24px auto 40px auto;
    padding: 0 16px;
}

/* HEADER */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.admin-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 900;
}

.admin-header a {
    text-decoration: none;
    font-weight: 800;
    color: var(--blue);
}

/* DISTRICT BUTTONS */
.district-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.district-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70px;
    background: var(--white);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 900;
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.district-btn:hover {
    transform: translateY(-4px);
    background: linear-gradient(135deg, #fff, #f9fbff);
}

/* PANEL CARD */
.panel-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    border: 1px solid var(--line);
}

/* TABLE */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead {
    background: #f1f5f9;
}

th {
    text-align: left;
    padding: 14px;
    font-weight: 900;
    font-size: 13px;
    color: #334155;
    border-bottom: 1px solid var(--line);
}

td {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

tr:hover {
    background: #f9fbff;
}

/* STATUS */
.status {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.status-new {
    background: rgba(246, 201, 69, .2);
    color: #7a5a00;
}

.status-approved {
    background: rgba(34, 197, 94, .15);
    color: #166534;
}

.status-archived {
    background: rgba(148, 163, 184, .2);
    color: #334155;
}

/* ACTION BUTTONS */
.action-buttons {
    display: flex;
    gap: 6px;
}

.btn {
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    padding: 8px 10px;
    border-radius: 8px;
}

.btn-approve {
    background: #22c55e;
    color: #fff;
}

.btn-archive {
    background: #64748b;
    color: #fff;
}

.btn-delete {
    background: #ef4444;
    color: #fff;
}

/* SEARCH BAR */
.search-box {
    margin-bottom: 18px;
}

.search-box input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    outline: none;
}

.search-box input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(18, 63, 120, .1);
}

/* EMPTY */
.empty-state {
    padding: 40px;
    text-align: center;
    color: var(--muted);
    font-weight: 700;
}

/* BUTTONS & ACTIONS */
.btn-detail {
    background: #123f78;
    color: #fff;
    text-decoration: none;
    display: inline-block;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    transition: background 0.2s;
}

.btn-detail:hover {
    background: #09264c;
}

.admin-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-back-subtle {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 12.5px;
    transition: all 0.2s;
}

.btn-back-subtle:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 800;
    font-size: 12.5px;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.field-hint {
    display: block;
    margin-top: 4px;
    font-size: 11.5px;
    color: #64748b;
    font-weight: 600;
    line-height: 1.3;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #e2e8f0;
    color: #1e293b;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 800;
    font-size: 13px;
    transition: background 0.2s;
}

.btn-back:hover {
    background: #cbd5e1;
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: #123f78;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(18, 63, 120, 0.25);
    transition: all 0.2s;
}

.primary-btn:hover {
    background: #09264c;
    transform: translateY(-2px);
}

.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: #e2e8f0;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
}

/* ALERTS */
.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 14px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 14px;
}

/* SUMMARY CARD */
.summary-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-item label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.5px;
}

.summary-item strong {
    font-size: 15px;
    color: var(--text);
}

/* FORM SECTIONS & GRID */
.form-section {
    margin-bottom: 24px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.section-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #123f78;
    color: #fff;
    border-radius: 50%;
    font-weight: 900;
    font-size: 14px;
}

.section-title h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
}

.section-title p {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--muted);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 22px;
}

.grid-full {
    grid-column: 1 / -1;
}

.form-grid label {
    display: block;
    margin-bottom: 6px;
    font-weight: 800;
    font-size: 13px;
    color: #334155;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(18, 63, 120, 0.12);
}

/* DOC NOTICE */
.doc-preview-notice {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    margin-bottom: 24px;
}

.detail-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
    margin-bottom: 40px;
}

/* ADDITIONAL STATUS BADGES */
.status-under_review, .status-reviewing {
    background: rgba(59, 130, 246, 0.15);
    color: #1e40af;
}

.status-rejected, .status-missing {
    background: rgba(239, 68, 68, 0.15);
    color: #991b1b;
}

.status-completed {
    background: rgba(34, 197, 94, 0.18);
    color: #166534;
}

.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #92400e;
}

/* DOC PRINTING & ACTIONS (FAZ 3B) */
.btn-package-print {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #16a34a;
    color: #ffffff;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-package-print:hover {
    background: #15803d;
    transform: translateY(-1px);
}

.doc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.doc-item-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.doc-item-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.doc-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.doc-num-badge {
    font-size: 12px;
    font-weight: 900;
    color: #123f78;
    background: #e0f2fe;
    padding: 2px 8px;
    border-radius: 6px;
}

.doc-stage-badge {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 6px;
}

.doc-item-title {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
    line-height: 1.35;
}

.doc-item-purpose {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 14px;
    line-height: 1.45;
    flex-grow: 1;
}

.doc-item-footer {
    display: flex;
    justify-content: flex-end;
}

.btn-doc-print {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    color: #1e3a8a;
    border: 1px solid #cbd5e1;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-doc-print:hover {
    background: #1e3a8a;
    color: #ffffff;
    border-color: #1e3a8a;
}

/* ==========================================================================
   FAZ 5 & FAZ 5.2: İMZALI EVRAK ARŞİVİ VE FİZİKİ BELGE YÖNETİMİ
   ========================================================================== */

/* DETAIL PAGE: SECTION 7 ÖZET KARTI */
.doc-archive-summary-section {
    border-top: 3px solid #0f2b48;
}

.doc-archive-summary-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #0f2b48;
    border-radius: 16px;
    padding: 22px 24px;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.doc-summary-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.doc-stat-pill {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.doc-stat-label {
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.doc-stat-val {
    font-size: 14px;
    font-weight: 900;
    color: #0f172a;
}

.doc-stat-val.text-active {
    color: #15803d;
}

.doc-stat-val.text-archived {
    color: #475569;
}

.doc-stat-latest {
    max-width: 320px;
}

.doc-stat-latest .doc-stat-val {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    font-size: 13px;
}

.doc-stat-latest small {
    font-size: 11px;
    font-weight: normal;
    color: #64748b;
}

.doc-stat-empty {
    font-size: 13px;
    color: #94a3b8;
    font-style: italic;
}

.doc-summary-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-open-archive {
    background: #0f2b48 !important;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(15, 43, 72, 0.25);
    text-decoration: none;
}

.btn-open-archive:hover {
    background: #1e3a8a !important;
}

.btn-upload-shortcut {
    background: #ffffff !important;
    color: #0f2b48 !important;
    border: 1px solid #cbd5e1 !important;
    gap: 6px;
    text-decoration: none;
}

.btn-upload-shortcut:hover {
    background: #f1f5f9 !important;
    border-color: #0f2b48 !important;
}

.doc-summary-hint {
    margin-top: 14px;
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.5;
}

/* DEDICATED EVRAK ARŞİV SAYFASI (admin/documents/index.php) */
.doc-member-hero {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 22px 26px;
    margin-bottom: 22px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.doc-member-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.doc-member-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.doc-member-title h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    color: #0f172a;
}

.doc-member-id {
    font-size: 12px;
    font-weight: 900;
    color: #0f2b48;
    background: #e2e8f0;
    padding: 4px 10px;
    border-radius: 8px;
}

.doc-member-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13.5px;
    color: #475569;
    font-weight: 600;
}

.doc-member-badges {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.badge-count-active {
    background: #dcfce7;
    color: #166534;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 800;
    display: inline-block;
}

.badge-count-archived {
    background: #f1f5f9;
    color: #475569;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 800;
    display: inline-block;
}

.doc-quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.doc-quick-actions a {
    text-decoration: none;
    gap: 8px;
}

/* CUSTOM FILE PICKER */
.custom-file-picker {
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-file-picker:hover {
    border-color: #0f2b48;
    background: #f8fafc;
}

.hidden-file-input {
    display: none;
}

.file-picker-icon {
    font-size: 28px;
}

.file-picker-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.file-picker-text strong {
    font-size: 14px;
    color: #0f2b48;
    font-weight: 800;
}

.file-picker-text span {
    font-size: 12px;
    color: #64748b;
}

/* UPLOAD FORM & TABLES */
.upload-box-wrapper {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-left: 4px solid #0f2b48;
    border-radius: 14px;
    padding: 24px;
    margin-top: 12px;
}

.upload-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

.upload-field-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 800;
    font-size: 13px;
    color: #334155;
}

.doc-empty-state {
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: 26px 20px;
    text-align: center;
    color: #334155;
}

.doc-table-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow-x: auto;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
    -webkit-overflow-scrolling: touch;
}

.doc-archive-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 640px;
}

.doc-archive-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 800;
    font-size: 12px;
    padding: 14px 18px;
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.doc-archive-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    font-size: 13.5px;
}

.doc-archive-table tbody tr:last-child td {
    border-bottom: none;
}

.doc-archive-table tbody tr:hover {
    background: #f8fafc;
}

.doc-title-cell {
    font-weight: 800;
    color: #0f172a;
    font-size: 14px;
}

.doc-filename-cell {
    font-weight: 700;
    color: #1e293b;
    font-size: 13px;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 280px;
    line-height: 1.4;
}

.doc-note-cell {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 280px;
    line-height: 1.35;
}

.doc-mime-cell {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

.doc-uploader-cell {
    font-weight: 700;
    color: #334155;
    font-size: 12.5px;
}

.doc-date-cell {
    font-size: 11.5px;
    color: #64748b;
    margin-top: 2px;
}

.doc-actions-cell {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.doc-cat-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    margin-top: 4px;
}

.doc-cat-official {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.doc-cat-attachment {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.doc-cat-other {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.file-size-badge {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 800;
    color: #0369a1;
    background: #e0f2fe;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid #bae6fd;
}

.btn-table-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-table-view {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.btn-table-view:hover {
    background: #1d4ed8;
    color: #ffffff;
}

.btn-table-download {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}

.btn-table-download:hover {
    background: #15803d;
    color: #ffffff;
}

.btn-table-archive {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.btn-table-archive:hover {
    background: #b91c1c;
    color: #ffffff;
}

.btn-table-restore {
    background: #fdf4ff;
    color: #86198f;
    border-color: #f5d0fe;
}

.btn-table-restore:hover {
    background: #86198f;
    color: #ffffff;
}

.archived-docs-details {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 18px;
}

.archived-docs-summary {
    cursor: pointer;
    font-weight: 800;
    font-size: 14px;
    color: #475569;
    user-select: none;
}

.archived-docs-summary:hover {
    color: #0f2b48;
}

.doc-security-note {
    margin-top: 24px;
    padding: 16px 20px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */

@media (max-width: 900px) {
    .admin-wrap {
        margin: 24px auto;
        padding: 0 16px;
    }

    .upload-form-grid {
        grid-template-columns: 1fr;
    }

    .district-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .doc-grid {
        grid-template-columns: 1fr;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .doc-member-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .admin-wrap {
        margin: 16px auto;
        padding: 0 12px;
    }

    .admin-header h1 {
        font-size: 22px;
    }

    .admin-nav-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 6px;
    }

    .admin-nav-actions a {
        font-size: 12px;
        padding: 7px 10px;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 10px 12px;
    }

    .summary-card {
        grid-template-columns: 1fr 1fr;
        padding: 16px;
        gap: 12px;
    }

    .doc-archive-summary-box {
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
    }

    .doc-summary-stats {
        flex-direction: column;
        align-items: stretch;
    }

    .doc-summary-actions {
        width: 100%;
        flex-direction: column;
    }

    .doc-summary-actions a {
        width: 100%;
        justify-content: center;
    }

    .doc-quick-actions {
        flex-direction: column;
    }

    .doc-quick-actions a {
        width: 100%;
        justify-content: center;
    }

    .detail-actions {
        flex-direction: column;
        gap: 12px;
    }

    .detail-actions button, .detail-actions a {
        width: 100%;
    }

    .doc-member-badges {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .custom-file-picker {
        padding: 12px 14px;
    }

    .btn-package-print {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 430px) {
    .admin-header h1 {
        font-size: 20px;
    }

    .summary-card {
        grid-template-columns: 1fr;
    }

    .doc-member-badges {
        grid-template-columns: 1fr;
    }

    .doc-stat-pill {
        padding: 8px 12px;
    }
}

/* ==========================================================================
   ULASS DATÇA — KURUMSAL & SÖZLEŞMELİ TEKİL YÖNETİM PANELİ STİLLERİ
   ========================================================================== */

body.admin-portal-body {
    background: #f1f5f9;
    color: #0f172a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body.admin-portal-body .admin-wrap {
    max-width: 1320px;
    margin: 24px auto 40px;
    padding: 0 16px;
}

/* KURUMSAL HEADER */
.admin-header-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-seal-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0c233a 0%, #17385a 100%);
    box-shadow: 0 4px 12px rgba(12, 35, 58, 0.2);
    flex-shrink: 0;
}

.seal-icon {
    font-size: 22px;
}

.admin-header-title h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #0c233a;
    letter-spacing: -0.3px;
    line-height: 1.25;
}

.admin-header-title p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    line-height: 1.4;
}

.admin-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
}

.admin-user-avatar {
    font-size: 15px;
}

.admin-user-meta {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}

.admin-user-name {
    font-size: 12px;
    font-weight: 800;
    color: #0c233a;
}

.admin-user-role {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
}

.admin-ui-icon {
    display: inline-block;
    width: 15px;
    height: 15px;
    vertical-align: middle;
    margin-right: 4px;
}

/* METRICS GRID (ÖZET KARTLARI) */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.metric-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 2px 8px rgba(12, 35, 58, 0.04);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 4px solid #cbd5e1;
    user-select: none;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(12, 35, 58, 0.08);
    border-color: #cbd5e1;
}

.metric-card.metric-total {
    border-left-color: #0c233a;
}

.metric-card.metric-new {
    border-left-color: #2563eb;
}

.metric-card.metric-pending {
    border-left-color: #d97706;
}

.metric-card.metric-approved {
    border-left-color: #16a34a;
}

.metric-card.metric-rejected {
    border-left-color: #dc2626;
}

.metric-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.metric-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

.metric-icon {
    font-size: 16px;
}

.metric-value {
    font-size: 26px;
    font-weight: 900;
    color: #0c233a;
    margin: 8px 0 4px;
    line-height: 1;
}

.metric-footer {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

/* FİLTRE VE ARAMA PANELİ */
.filter-panel {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.search-box-wrap {
    flex: 1;
    min-width: 280px;
    position: relative;
}

.search-icon-box {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: #94a3b8;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.admin-search-input {
    width: 100%;
    padding: 11px 36px 11px 40px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 13.5px;
    color: #0f172a;
    outline: none;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
    transition: all 0.2s;
}

.admin-search-input:focus {
    border-color: #c2a05c;
    box-shadow: 0 0 0 3px rgba(194, 160, 92, 0.15);
}

.search-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #e2e8f0;
    border: none;
    font-size: 12px;
    color: #475569;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.status-filter-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 7px 13px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.filter-pill:hover:not(.active) {
    background: #f8fafc;
    color: #0f172a;
    border-color: #94a3b8;
}

.filter-pill.active {
    background: #0c233a;
    color: #ffffff;
    border-color: #0c233a;
    box-shadow: 0 2px 6px rgba(12, 35, 58, 0.18);
}

/* ANA TABLO KARTI */
/* ANA TABLO KARTI */
.main-table-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(12, 35, 58, 0.04);
    padding: 0;
    position: relative;
}

.table-section-head {
    padding: 14px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafbfc;
    border-top-left-radius: 13px;
    border-top-right-radius: 13px;
}

.table-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-title-group h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #0c233a;
    letter-spacing: -0.2px;
}

.table-count-badge {
    display: inline-block;
    padding: 3px 9px;
    background: #e2e8f0;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
}

.table-subtext {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.table-wrap {
    width: 100%;
    position: relative;
}

@media (min-width: 1025px) {
    .table-wrap {
        overflow: visible;
    }
}

/* RESMİ KURUMSAL TABLO */
table.corporate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    text-align: left;
}

table.corporate-table thead {
    background: #f8fafc;
    border-bottom: 2px solid #cbd5e1;
}

table.corporate-table th {
    padding: 9px 8px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #334155;
    border-bottom: 2px solid #cbd5e1;
    white-space: nowrap;
}

table.corporate-table td {
    padding: 7px 8px;
    border-bottom: 1px solid #edf2f7;
    vertical-align: middle;
    color: #1e293b;
    font-size: 12.5px;
    line-height: 1.35;
}

table.corporate-table tr:hover td {
    background: #f8fafc;
}

.row-order-num {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    text-align: center;
}

.member-no-badge {
    display: inline-block;
    padding: 2px 7px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-weight: 800;
    color: #0c233a;
    font-size: 11.5px;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 2px rgba(12, 35, 58, 0.04);
}

.id-badge {
    display: inline-block;
    padding: 2px 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-family: monospace;
    font-weight: 700;
    color: #475569;
    font-size: 11px;
}

.member-name-link {
    font-weight: 700;
    color: #0c233a;
    text-decoration: none;
    transition: color 0.15s;
}

.member-name-link:hover {
    color: #c2a05c;
    text-decoration: underline;
}

.phone-link {
    color: #334155;
    text-decoration: none;
    font-weight: 600;
}

.phone-link:hover {
    color: #0c233a;
    text-decoration: underline;
}

.text-nowrap {
    white-space: nowrap;
}

.text-truncate {
    display: inline-block;
    max-width: 125px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    line-height: 1.3;
    max-height: 2.6em;
}

.email-cell {
    font-size: 12px;
    color: #475569;
}

.profession-cell {
    font-size: 12px;
    color: #334155;
    font-weight: 500;
}

.member-note-cell {
    font-size: 11.5px;
    color: #64748b;
}

.date-stacked {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.date-main {
    font-size: 11.5px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}

.time-sub {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 600;
}

.date-cell {
    color: #475569;
    font-size: 12px;
    font-weight: 500;
}

.text-muted {
    color: #94a3b8;
}

/* DURUM ROZETLERİ (STATUS BADGES) */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2px;
    text-transform: none;
    white-space: nowrap;
}

.status-badge.status-new {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.status-badge.status-pending {
    background: #fefce8;
    color: #854d0e;
    border: 1px solid #fef08a;
}

.status-badge.status-approved {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.status-badge.status-rejected {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.status-badge.status-archived {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.status-badge.status-unknown {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

/* AKSİYON BUTONLARI */
.row-actions {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
    white-space: nowrap;
}

.btn-row-detail {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    background: #0c233a;
    color: #ffffff;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s;
    line-height: 1.2;
    white-space: nowrap;
}

.btn-row-detail:hover {
    background: #193f66;
    color: #ffffff;
}

.btn-row-docs {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    background: #fdfaf3;
    color: #8a6828;
    border: 1px solid #e0ce9f;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s;
    line-height: 1.2;
    white-space: nowrap;
}

.btn-row-docs:hover {
    background: #f6edd4;
    border-color: #c2a05c;
    color: #6e5018;
}

/* SATIR İŞLEM DROPDOWN */
.row-dropdown {
    position: relative;
    display: inline-block;
}

.btn-row-dropdown {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 5px 8px;
    background: #f8fafc;
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    line-height: 1.2;
    white-space: nowrap;
}

.btn-row-dropdown:hover,
.row-dropdown.open .btn-row-dropdown {
    background: #0c233a;
    color: #ffffff;
    border-color: #0c233a;
}

.row-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(12, 35, 58, 0.15);
    z-index: 1000;
    min-width: 125px;
    padding: 4px;
    text-align: left;
}

.row-dropdown.open .row-dropdown-menu {
    display: block;
}

.row-dropdown-menu form {
    margin: 0;
    padding: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 6px 10px;
    font-size: 11.5px;
    font-weight: 700;
    color: #334155;
    background: transparent;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: left;
    transition: all 0.12s;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: #f1f5f9;
}

.dropdown-item.item-passive:hover {
    background: #f8fafc;
    color: #475569;
}

.dropdown-item.item-active:hover {
    background: #f0fdf4;
    color: #15803d;
}

.dropdown-item.item-delete {
    color: #b91c1c;
}

.dropdown-item.item-delete:hover {
    background: #fef2f2;
    color: #991b1b;
}

/* SATIR İŞLEM BUTONLARI (TEKİL / GERİ AL) */
.btn-row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease-in-out;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.2;
}

.btn-row-restore {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.btn-row-restore:hover {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

/* AKTİFLİK ROZETLERİ */
.activity-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.activity-active {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.activity-passive {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

.activity-deleted {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* GÖRÜNÜM FİLTRE ÇUBUĞU */
.view-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 0 2px;
}

.view-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.view-filter-label {
    font-size: 11.5px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    text-decoration: none;
    transition: all 0.15s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.view-filter-pill:hover {
    background: #f8fafc;
    color: #0c233a;
    border-color: #94a3b8;
}

.view-filter-pill.active {
    background: #0c233a;
    color: #ffffff;
    border-color: #0c233a;
}

.view-filter-pill.pill-deleted.active {
    background: #991b1b;
    color: #ffffff;
    border-color: #991b1b;
}

/* RESPONSIVE KURALLARI */
@media (max-width: 1024px) {
    .metrics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table.corporate-table {
        min-width: 860px;
    }
}

@media (max-width: 768px) {
    body.admin-portal-body .admin-wrap {
        padding: 0 12px;
        margin: 16px auto 32px;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .status-filter-pills {
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .view-filter-bar {
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .view-filter-group {
        flex-wrap: nowrap;
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .admin-header-main {
        flex-direction: row;
        align-items: flex-start;
    }

    .admin-header {
        padding: 16px;
    }

    .admin-nav-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ==========================================================================
   KOMPAKT BAŞVURU DETAY SAYFASI (MINIMIZED DETAIL VIEW)
   ========================================================================== */

body.detail-page-body {
    background-color: #f8fafc;
    padding-bottom: 96px; /* Sticky bar için alt boşluk */
}

.detail-compact-wrap {
    max-width: 1120px;
    margin: 24px auto 40px auto;
    padding: 0 16px;
}

/* 1. Kompakt Üst Başlık */
.detail-compact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 8px 0 16px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.detail-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn-compact-round-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    color: #0c233a;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.btn-compact-round-back:hover {
    background: #0c233a;
    color: #c2a05c;
    border-color: #0c233a;
    transform: translateX(-2px);
}

.btn-compact-round-back .admin-ui-icon {
    width: 18px;
    height: 18px;
}

.detail-header-text h1 {
    font-size: 20px;
    font-weight: 800;
    color: #0c233a;
    margin: 0 0 3px 0;
    line-height: 1.25;
}

.detail-header-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #64748b;
    flex-wrap: wrap;
}

.detail-header-meta .meta-badge {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.detail-header-meta .meta-sep {
    color: #cbd5e1;
}

.detail-header-meta .meta-author {
    color: #475569;
}

.detail-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-subtle-action {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: #334155;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}

.btn-subtle-action:hover {
    background: #f1f5f9;
    color: #0c233a;
    border-color: #94a3b8;
}

.btn-logout-action {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: #991b1b;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}

.btn-logout-action:hover {
    background: #fee2e2;
    color: #7f1d1d;
    border-color: #f87171;
}

/* Alert Compact */
.alert-compact {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    margin-bottom: 14px;
}

/* 2. Üst Kontrol ve Özet Kartı (Yatay Grid) */
.detail-control-card {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 14px;
    box-shadow: 0 2px 6px rgba(12, 35, 58, 0.04);
    gap: 12px;
}

.detail-control-card .control-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    border-right: 1px solid #f1f5f9;
    padding-right: 8px;
}

.detail-control-card .control-col:last-child {
    border-right: none;
    padding-right: 0;
}

.detail-control-card .control-label {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

.detail-control-card .control-val {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-control-card .link-phone {
    color: #0f4c81;
    text-decoration: none;
}

.detail-control-card .link-phone:hover {
    text-decoration: underline;
}

.detail-control-card .text-primary {
    color: #0c233a;
}

.detail-control-card .text-docs {
    font-size: 12px;
    color: #475569;
}

/* 3. Kompakt Uyarı Kutusu */
.compact-notice-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.notice-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.4;
    flex: 1 1 300px;
}

.notice-pill.notice-warn {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.notice-pill.notice-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #075985;
}

.notice-pill .notice-icon {
    font-size: 14px;
    flex-shrink: 0;
}

/* Toolbar */
.accordion-top-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 4px;
}

.accordion-top-toolbar .toolbar-title {
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748b;
}

.accordion-top-toolbar .btn-toggle-all {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s;
}

.accordion-top-toolbar .btn-toggle-all:hover {
    background: #f1f5f9;
    color: #0c233a;
}

/* 4. Accordion Yapısı */
.detail-accordion {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(12, 35, 58, 0.03);
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.detail-accordion[open] {
    border-color: #cbd5e1;
    box-shadow: 0 3px 10px rgba(12, 35, 58, 0.05);
}

.accordion-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    cursor: pointer;
    user-select: none;
    background: #ffffff;
    list-style: none;
    transition: background 0.15s;
}

.accordion-summary::-webkit-details-marker {
    display: none;
}

.accordion-summary:hover {
    background: #f8fafc;
}

.detail-accordion[open] > .accordion-summary {
    border-bottom: 1px solid #f1f5f9;
    background: #fbfcfe;
}

.accordion-head-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.accordion-head-left .section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #0c233a;
    color: #ffffff;
    font-weight: 800;
    font-size: 12px;
    flex-shrink: 0;
}

.accordion-titles {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.accordion-titles h3 {
    margin: 0;
    font-size: 14.5px;
    font-weight: 800;
    color: #0c233a;
}

.accordion-chip {
    display: inline-flex;
    align-items: center;
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.accordion-chip.chip-success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.accordion-chip.chip-warn {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.accordion-chevron {
    font-size: 14px;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.detail-accordion[open] .accordion-chevron {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 16px 18px;
    background: #ffffff;
}

/* Kompakt Form Alanları */
.detail-compact-wrap .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px 16px;
}

.detail-compact-wrap .form-grid label {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 4px;
    display: block;
}

.detail-compact-wrap .form-grid .form-input {
    width: 100%;
    height: 36px;
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.detail-compact-wrap .form-grid .form-input:focus {
    border-color: #0c233a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(12, 35, 58, 0.1);
}

.detail-compact-wrap .form-grid textarea.form-input {
    height: auto;
    min-height: 52px;
    padding: 6px 10px;
    font-size: 13px;
    line-height: 1.4;
    resize: vertical;
}

.detail-compact-wrap .form-grid .field-hint {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
    display: block;
}

.detail-compact-wrap .grid-full {
    grid-column: 1 / -1;
}

/* Form içi alt butonlar (Sayfa sonu yedeği) */
.form-bottom-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 14px;
    margin-bottom: 24px;
}

.btn-save-action {
    background: linear-gradient(135deg, #0c233a, #132f4c);
    color: #ffffff;
    border: 1px solid #0c233a;
    padding: 9px 20px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-save-action:hover {
    color: #c2a05c;
    box-shadow: 0 2px 8px rgba(12, 35, 58, 0.2);
}

.btn-compact-back {
    display: inline-flex;
    align-items: center;
    padding: 9px 16px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    text-decoration: none;
    transition: all 0.15s;
}

.btn-compact-back:hover {
    background: #f1f5f9;
    color: #0c233a;
}

/* 5. Kompakt Evrak İşlemleri ve Arşiv Merkezi */
.compact-doc-center {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(12, 35, 58, 0.04);
    margin-bottom: 28px;
}

.doc-center-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 14px;
}

.doc-center-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.doc-center-badge {
    font-size: 24px;
    line-height: 1;
}

.doc-center-title-group h2 {
    margin: 0 0 2px 0;
    font-size: 16px;
    font-weight: 800;
    color: #0c233a;
}

.doc-center-title-group p {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}

.doc-center-counts {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.count-pill {
    font-size: 11.5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
}

.count-pill.pill-active {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.count-pill.pill-archived {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.doc-center-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.btn-package-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0c233a;
    color: #ffffff;
    border: 1px solid #0c233a;
    padding: 9px 18px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(12, 35, 58, 0.12);
    transition: all 0.15s;
}

.btn-package-action:hover {
    background: #132f4c;
    color: #c2a05c;
    transform: translateY(-1px);
}

.btn-archive-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fdfaf3;
    color: #8a6828;
    border: 1px solid #e0ce9f;
    padding: 9px 16px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s;
}

.btn-archive-action:hover {
    background: #f6edd4;
    color: #6e5018;
    border-color: #c2a05c;
}

.btn-upload-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
    padding: 9px 16px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s;
}

.btn-upload-action:hover {
    background: #e0f2fe;
    color: #075985;
}

.doc-center-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 14px;
    flex-wrap: wrap;
}

.latest-doc-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    flex: 1 1 280px;
}

.latest-doc-info .info-label {
    color: #64748b;
    font-weight: 600;
}

.latest-doc-info .info-val {
    color: #0c233a;
    font-weight: 700;
}

.latest-doc-info .info-empty {
    color: #94a3b8;
    font-style: italic;
}

.single-doc-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.single-doc-picker label {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}

.single-doc-picker select {
    height: 32px;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    max-width: 280px;
}

.btn-sm-print {
    height: 32px;
    padding: 0 14px;
    background: #0c233a;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-sm-print:hover {
    background: #132f4c;
    color: #c2a05c;
}

/* 6. Sticky Action Bar */
.sticky-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 2px solid #c2a05c;
    box-shadow: 0 -4px 16px rgba(12, 35, 58, 0.12);
    z-index: 999;
    padding: 9px 20px;
}

.sticky-bar-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.sticky-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-bar-left .sticky-indicator {
    color: #10b981;
    font-size: 16px;
}

.sticky-bar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-sticky-save {
    background: linear-gradient(135deg, #0c233a, #132f4c);
    color: #ffffff;
    border: 1px solid #0c233a;
    padding: 9px 22px;
    border-radius: 7px;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(12, 35, 58, 0.2);
    transition: all 0.15s;
}

.btn-sticky-save:hover {
    color: #c2a05c;
    box-shadow: 0 4px 12px rgba(12, 35, 58, 0.25);
}

.btn-sticky-cancel {
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 7px;
    text-decoration: none;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
    transition: all 0.15s;
}

.btn-sticky-cancel:hover {
    background: #e2e8f0;
    color: #0c233a;
}

/* ==========================================================================
   RESPONSIVE UYARLAMALARI (Masaüstü, Tablet, Mobil)
   ========================================================================== */

@media (max-width: 1024px) {
    .detail-control-card {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .detail-compact-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .detail-header-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .detail-control-card {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .detail-control-card .control-col {
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
        padding-bottom: 8px;
    }

    .doc-center-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .doc-center-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .single-doc-picker {
        width: 100%;
    }

    .single-doc-picker select {
        max-width: none;
        flex: 1;
    }

    .sticky-bar-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .sticky-bar-right {
        width: 100%;
        justify-content: space-between;
    }

    .btn-sticky-save, .btn-sticky-cancel {
        flex: 1;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .detail-control-card {
        grid-template-columns: 1fr;
    }

    .accordion-summary {
        padding: 10px 14px;
    }

    .accordion-titles h3 {
        font-size: 13.5px;
    }

    .doc-center-actions {
        flex-direction: column;
    }

    .btn-package-action, .btn-archive-action, .btn-upload-action {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}