/* Caria Apartman — Metrica üzerine tek panelli yerleşim */
:root {
    --ca-sidebar-w: 260px;
    --ca-topbar-h: 64px;
    --ca-primary: #0b51b7;
    --ca-primary-soft: #eaf1fd;
    --ca-text: #2b3446;
    --ca-muted: #8a94a6;
    --ca-border: #eceff5;
    --ca-bg: #f5f7fb;
}

body.caria {
    padding: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: auto !important;
    background: var(--ca-bg);
    color: var(--ca-text);
}

/* ---------- Sol menü ---------- */
.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--ca-sidebar-w);
    background: #fff;
    border-right: 1px solid var(--ca-border);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease;
}

.app-sidebar .sidebar-brand {
    height: var(--ca-topbar-h);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--ca-border);
}

.app-sidebar .sidebar-brand a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ca-text);
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
}

.app-sidebar .sidebar-brand img { height: 30px; }

.app-sidebar .sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 12px 24px;
}

.side-menu { list-style: none; margin: 0; padding: 0; }

.side-menu .menu-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ca-muted);
    padding: 16px 12px 8px;
}

.side-menu .menu-label:first-child { padding-top: 4px; }

.side-menu .menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    margin: 2px 0;
    border-radius: 8px;
    color: #3d4659;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s, color .15s;
}

.side-menu .menu-link .menu-icon {
    font-size: 19px;
    color: #6b7489;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.side-menu .menu-link .menu-arrow {
    margin-left: auto;
    font-size: 14px;
    color: #9aa3b5;
    transition: transform .2s;
}

.side-menu .menu-link[aria-expanded="true"] .menu-arrow { transform: rotate(90deg); }

.side-menu .menu-link:hover { background: #f4f6fb; color: var(--ca-text); }

.side-menu .menu-link.active {
    background: var(--ca-primary-soft);
    color: var(--ca-primary);
    font-weight: 600;
}

.side-menu .menu-link.active .menu-icon { color: var(--ca-primary); }

.side-menu .sub-menu { list-style: none; padding: 2px 0 4px 44px; margin: 0; }

.side-menu .sub-menu a {
    display: block;
    padding: 6px 10px;
    font-size: 13.5px;
    color: #5d667a;
    border-radius: 6px;
    text-decoration: none;
}

.side-menu .sub-menu a:hover { color: var(--ca-primary); }
.side-menu .sub-menu a.active { color: var(--ca-primary); font-weight: 600; }

/* ---------- Üst bar ---------- */
.app-main {
    margin-left: var(--ca-sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: var(--ca-topbar-h);
    background: #fff;
    border-bottom: 1px solid var(--ca-border);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
}

.app-topbar .topbar-btn {
    border: 0;
    background: transparent;
    font-size: 22px;
    color: #59627a;
    padding: 4px 8px;
    border-radius: 6px;
}

.app-topbar .topbar-btn:hover { background: #f4f6fb; }

.site-switcher .btn {
    border: 1px solid var(--ca-border);
    background: #fff;
    font-weight: 600;
    color: var(--ca-text);
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-switcher .dropdown-menu { max-height: 60vh; overflow-y: auto; min-width: 280px; }

.avatar-initials {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--ca-primary-soft);
    color: var(--ca-primary);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

/* ---------- İçerik ---------- */
.app-content { flex: 1; padding: 0 24px 32px; }

.app-content .page-title-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 0 16px;
}

.app-content .page-title { margin: 0; font-size: 18px; font-weight: 600; }
.app-content .breadcrumb { margin: 2px 0 0; font-size: 12.5px; }

.app-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--ca-border);
    background: #fff;
    color: var(--ca-muted);
    font-size: 13px;
}

.app-footer a { color: var(--ca-primary); font-weight: 600; text-decoration: none; }

.card { border: 1px solid var(--ca-border); border-radius: 10px; box-shadow: none; }
.card-header { background: #fff; border-bottom: 1px solid var(--ca-border); }
.table > :not(caption) > * > * { vertical-align: middle; }
.table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: #6b7489; font-weight: 600; background: #f8f9fc; }
.stat-card .stat-icon { width: 46px; height: 46px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; }
.text-debit { color: #d03f3f; }
.text-credit { color: #1f9d55; }
.form-label { font-weight: 500; font-size: 13px; }
.required::after { content: " *"; color: #d03f3f; }
.iti { width: 100%; }
.selectr-selected { border-color: #e3ebf6; }
.crop-box { max-height: 420px; background: #f4f6fb; }
.crop-box img { max-width: 100%; display: block; }
.img-preview { max-height: 120px; border-radius: 8px; border: 1px solid var(--ca-border); }

/* ---------- Giriş sayfası ---------- */
.auth-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(135deg, #eaf1fd, #f5f7fb); }
.auth-card { width: 100%; max-width: 420px; }

/* ---------- Portal ---------- */
.portal-nav .nav-link { color: #59627a; font-weight: 500; }
.portal-nav .nav-link.active { color: var(--ca-primary); }

/* ---------- Mobil ---------- */
.sidebar-backdrop { display: none; }

@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); }
    body.sidebar-open .app-sidebar { transform: translateX(0); }
    body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 1035; }
    .app-main { margin-left: 0; }
    .app-content { padding: 0 12px 24px; }
}

@media print {
    .app-sidebar, .app-topbar, .app-footer, .no-print { display: none !important; }
    .app-main { margin-left: 0; }
}
