/* ============================
   Avukat Ofis Yönetim Sistemi
   Ana Stil Dosyası
   ============================ */

:root {
    --sidebar-width: 260px;
    --sidebar-collapsed: 60px;
    --topbar-height: 56px;
    --sidebar-bg: #0f1d33;
    --sidebar-hover: #1a2d4d;
    --sidebar-active: #243b5e;
    --sidebar-text: #8fa4bf;
    --sidebar-text-active: #ffffff;
    --topbar-bg: #ffffff;
    --primary: #1e3a5f;
    --primary-light: #2b5797;
    --accent: #4a90d9;
    --body-bg: #f0f2f5;
    --card-bg: #ffffff;
    --text-dark: #1a1a2e;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --transition: 0.3s ease;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    background: var(--body-bg);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    font-size: 14px;
}

/* ---- SIDEBAR ---- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1040;
    transition: width var(--transition);
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    white-space: nowrap;
}
.sidebar-brand i { font-size: 22px; margin-right: 10px; }
.sidebar.collapsed .sidebar-brand span { display: none; }

.sidebar-nav { padding: 8px 0; }

.nav-section {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
    padding: 12px 18px 4px;
    font-weight: 600;
}
.sidebar.collapsed .nav-section { display: none; }

.nav-item { position: relative; }

.nav-link {
    display: flex;
    align-items: center;
    padding: 9px 18px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 13.5px;
    transition: all 0.2s;
    white-space: nowrap;
    border-left: 3px solid transparent;
}
.nav-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
}
.nav-link.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
    border-left-color: var(--accent);
}
.nav-link i { width: 22px; text-align: center; margin-right: 10px; font-size: 15px; }
.sidebar.collapsed .nav-link span { display: none; }
.sidebar.collapsed .nav-link { justify-content: center; padding: 10px; }

/* Sub-menu */
.nav-sub { display: none; background: rgba(0,0,0,0.15); }
.nav-sub.show { display: block; }
.nav-sub .nav-link {
    padding: 7px 18px 7px 48px;
    font-size: 13px;
}
.sidebar.collapsed .nav-sub { display: none !important; }

.nav-toggle { cursor: pointer; }
.nav-toggle::after {
    content: '\f282';
    font-family: 'bootstrap-icons';
    margin-left: auto;
    font-size: 11px;
    transition: transform 0.2s;
}
.nav-toggle[aria-expanded="true"]::after { transform: rotate(90deg); }

/* ---- TOPBAR ---- */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 1030;
    transition: left var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.sidebar.collapsed ~ .main-wrapper .topbar,
.sidebar.collapsed ~ .topbar { left: var(--sidebar-collapsed); }

.topbar-toggle {
    border: none;
    background: none;
    font-size: 20px;
    color: var(--text-dark);
    cursor: pointer;
    padding: 4px 8px;
    margin-right: 12px;
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
}

/* ---- MAIN CONTENT ---- */
.main-wrapper {
    margin-left: var(--sidebar-width);
    padding-top: var(--topbar-height);
    transition: margin-left var(--transition);
    min-height: 100vh;
}
.sidebar.collapsed ~ .main-wrapper { margin-left: var(--sidebar-collapsed); }

.main-content { padding: 24px; }

/* ---- BREADCRUMB ---- */
.breadcrumb-wrapper {
    background: transparent;
    padding: 0 0 16px;
}
.breadcrumb { margin: 0; font-size: 13px; }

/* ---- PAGE HEADER ---- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.page-header h4 { margin: 0; font-weight: 600; color: var(--primary); }

/* ---- CARDS ---- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    padding: 12px 16px;
}

/* Stat cards */
.stat-card {
    border-left: 4px solid var(--accent);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
}
.stat-card .stat-info h3 { margin: 0; font-size: 24px; font-weight: 700; }
.stat-card .stat-info p { margin: 0; color: var(--text-muted); font-size: 13px; }

/* ---- FILTER BAR ---- */
.filter-card { margin-bottom: 16px; }
.filter-card .card-body { padding: 12px 16px; }

/* ---- TABLE ---- */
.table { font-size: 13.5px; }
.table th {
    font-weight: 600;
    background: #f8f9fa;
    white-space: nowrap;
    border-bottom: 2px solid var(--border-color);
}
.table td { vertical-align: middle; }
.table-actions { white-space: nowrap; }
.table-actions a,
.table-actions button {
    padding: 3px 8px;
    font-size: 13px;
}

.total-count {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* ---- EMPTY STATE ---- */
.empty-state {
    text-align: center;
    padding: 48px 16px;
    color: var(--text-muted);
}
.empty-state i { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 14px; }
.form-label { font-weight: 500; font-size: 13px; margin-bottom: 4px; }
.form-control, .form-select { font-size: 14px; }
.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(74,144,217,0.2);
}

/* ---- BUTTONS ---- */
.btn { font-size: 13.5px; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-light); border-color: var(--primary-light); }

/* ---- LOGIN ---- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--primary) 100%);
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.login-card h3 { font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.login-card .subtitle { color: var(--text-muted); margin-bottom: 28px; }

/* ---- BADGE ---- */
.badge { font-weight: 500; font-size: 12px; }

/* ---- RESPONSIVE ---- */
@media (max-width: 992px) {
    .sidebar { width: var(--sidebar-collapsed); }
    .sidebar .nav-link span, .sidebar .nav-section, .sidebar-brand span { display: none; }
    .sidebar .nav-sub { display: none !important; }
    .main-wrapper { margin-left: var(--sidebar-collapsed); }
    .topbar { left: var(--sidebar-collapsed); }
    .sidebar.mobile-open { width: var(--sidebar-width); }
    .sidebar.mobile-open .nav-link span,
    .sidebar.mobile-open .nav-section,
    .sidebar.mobile-open .sidebar-brand span { display: inline; }
    .sidebar.mobile-open .nav-sub.show { display: block !important; }
}

@media (max-width: 576px) {
    .main-content { padding: 12px; }
    .page-header { flex-direction: column; align-items: flex-start; }
}

/* Print */
@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .main-wrapper { margin: 0 !important; padding: 0 !important; }
}

/* Scrollbar */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

/* ============================
   Corporate ERP Design System
   ============================ */

/* ---- CORPORATE TABS ---- */
.erp-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    background: #fff;
    padding: 0;
    margin: 0 0 0 0;
    list-style: none;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 0;
}
.erp-tabs .nav-item { flex-shrink: 0; }
.erp-tabs .nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    padding: 10px 16px;
    white-space: nowrap;
    transition: all 0.15s;
    background: transparent;
}
.erp-tabs .nav-link:hover {
    color: var(--primary);
    background: rgba(30,58,95,0.03);
}
.erp-tabs .nav-link.active {
    color: var(--primary);
    border-bottom-color: #c8a84e;
    font-weight: 600;
}
.erp-tabs .nav-link i { font-size: 14px; }

/* Scrollbar for tabs */
.erp-tabs::-webkit-scrollbar { height: 3px; }
.erp-tabs::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

/* ---- ERP FORM ---- */
.erp-form .form-group { margin-bottom: 10px; }
.erp-form .form-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #5a6a7e;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.erp-form .form-control,
.erp-form .form-select {
    font-size: 13px;
    padding: 5px 10px;
    border-radius: 3px;
    border: 1px solid #d0d5dd;
}
.erp-form .form-control:focus,
.erp-form .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(74,144,217,0.15);
}
.erp-form textarea.form-control { min-height: 60px; resize: vertical; }

/* ---- ERP PANEL ---- */
.erp-panel {
    background: #fff;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}
.erp-panel-header {
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 13px;
    background: #f8f9fa;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.erp-panel-header i { margin-right: 6px; }
.erp-panel-body { padding: 14px; }
.erp-panel-body.p-0 { padding: 0; }

/* ---- COMPACT BUTTONS ---- */
.btn-xs { font-size: 11px; padding: 2px 8px; line-height: 1.5; }
.btn-turquoise { background: #17a2b8; border-color: #17a2b8; color: #fff; }
.btn-turquoise:hover { background: #138496; border-color: #117a8b; color: #fff; }
.btn-gold { background: #c8a84e; border-color: #c8a84e; color: #fff; }
.btn-gold:hover { background: #b5963e; border-color: #a8892f; color: #fff; }

/* ---- CORPORATE TABLE ---- */
.erp-table { font-size: 12.5px; margin-bottom: 0; }
.erp-table thead th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f1f3f5;
    border-bottom: 2px solid #d8dde3;
    padding: 7px 10px;
    font-weight: 600;
    white-space: nowrap;
    color: #4a5568;
}
.erp-table tbody td {
    padding: 6px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #edf0f3;
}
.erp-table tbody tr:hover { background: #f8f9fc; }
.erp-table .table-actions { white-space: nowrap; }

/* ---- STATUS LABEL ---- */
.erp-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.erp-status .badge { font-weight: 500; padding: 3px 10px; border-radius: 3px; }

/* ---- TWO COLUMN PANEL GRID ---- */
.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 992px) { .two-col-grid { grid-template-columns: 1fr; } }

/* ---- TAB CONTENT ---- */
.erp-tab-content { padding: 16px 0; }

/* ---- SECTION DIVIDER ---- */
.section-divider { border: 0; border-top: 1px solid #e9ecef; margin: 12px 0; }

/* ---- INLINE INFO ROW ---- */
.info-row {
    display: flex;
    align-items: baseline;
    padding: 4px 0;
    border-bottom: 1px solid #f5f5f5;
}
.info-row:last-child { border-bottom: 0; }
.info-label { flex: 0 0 140px; font-size: 12px; color: #6c757d; font-weight: 500; }
.info-value { font-size: 13px; color: var(--text-dark); }

/* ---- EMPTY TAB STATE ---- */
.tab-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}
.tab-empty i { font-size: 40px; opacity: 0.25; display: block; margin-bottom: 10px; }
.tab-empty p { font-size: 13px; margin: 0; }

/* ---- QUICK ACTION BAR ---- */
.quick-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }

/* ---- MODAL CORPORATE ---- */
.modal-content { border-radius: 4px; border: 1px solid var(--border-color); box-shadow: 0 4px 24px rgba(0,0,0,0.12); }
.modal-header { background: #f8f9fa; padding: 10px 16px; border-bottom: 1px solid var(--border-color); }
.modal-title { font-size: 14px; font-weight: 600; }
.modal-body { padding: 16px; }
.modal-footer { padding: 10px 16px; border-top: 1px solid var(--border-color); }

/* ---- FINANCE SUMMARY MINI CARDS ---- */
.finance-mini-card {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    text-align: center;
}
.finance-mini-card .label { font-size: 11px; color: #6c757d; text-transform: uppercase; letter-spacing: 0.3px; }
.finance-mini-card .value { font-size: 16px; font-weight: 700; margin-top: 2px; }

/* ---- HEARING BADGE ---- */
.hearing-status-bekliyor { background: #ffc107; color: #000; }
.hearing-status-tamamlandi { background: #28a745; color: #fff; }
.hearing-status-ertelendi { background: #dc3545; color: #fff; }

/* ---- HORIZONTAL FORM LAYOUT (buroTeK style) ---- */
.hz-form .mb-2.row { margin-bottom: 0.35rem !important; }
.hz-form .col-form-label { font-weight: 600; font-size: 0.85rem; color: #333; }
.hz-form .form-control-sm, .hz-form .form-select-sm { font-size: 0.85rem; }
.hz-form .form-check-label { font-size: 0.85rem; }
.hz-form textarea.form-control-sm { font-size: 0.85rem; }
.hz-form .section-hint { font-size: 0.8rem; color: #999; font-style: italic; margin-bottom: 0.75rem; }
.tab-section-header { font-weight: 600; font-size: 0.95rem; border-bottom: 2px solid #ddd; padding-bottom: 4px; margin-bottom: 0.75rem; }
.tab-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tab-toolbar .search-box { flex: 1; max-width: 500px; }
.tab-toolbar .btn-group-actions { display: flex; gap: 6px; }
