/* =====================================================================
   MYHANE.COM - Ana Stil Dosyası
   Modern, monokrom (zinc), dark-first
   ===================================================================== */

:root {
    /* Zinc tabanlı koyu palet - saf siyah değil, hafif sıcak gri */
    --bg-0: #18181b;
    --bg-1: #1f1f23;
    --bg-2: #26262b;
    --bg-3: #2e2e34;
    --bg-4: #36363d;

    --border: #2a2a30;
    --border-strong: #35353c;
    --border-hover: #45454d;

    --text-0: #fafafa;
    --text-1: #e4e4e7;
    --text-2: #a1a1aa;
    --text-3: #71717a;
    --text-4: #52525b;

    --ok: #86efac;
    --err: #fca5a5;
    --warn: #fcd34d;
    --info: #93c5fd;

    --radius: 8px;
    --radius-sm: 6px;
    --radius-lg: 12px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.3);
    --shadow-lg: 0 10px 40px rgba(0,0,0,.5);

    --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

    --sidebar-w: 240px;
    --topbar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-1);
    background: var(--bg-0);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

h1, h2, h3, h4 { color: var(--text-0); font-weight: 600; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: 2rem; letter-spacing: -0.03em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
a { color: var(--text-0); text-decoration: none; transition: color .15s; }
a:hover { color: var(--text-2); }
.muted { color: var(--text-3); }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-0);
}
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-1);
    font-size: 12px;
    background: var(--bg-2);
}
.brand-name { letter-spacing: -0.02em; }

/* ============ PUBLIC LAYOUT ============ */
.topbar {
    border-bottom: 1px solid var(--border);
    background: rgba(24, 24, 27, .85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.topnav { display: flex; align-items: center; gap: 8px; }
.topnav a {
    padding: 8px 14px;
    color: var(--text-2);
    font-size: 14px;
    border-radius: var(--radius-sm);
    transition: all .15s;
}
.topnav a:hover { color: var(--text-0); background: var(--bg-2); }

main.container { padding-top: 48px; padding-bottom: 48px; }

.footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    color: var(--text-3);
    font-size: 13px;
    text-align: center;
}

.btn-ghost {
    border: 1px solid var(--border-strong);
    color: var(--text-0) !important;
}
.btn-ghost:hover { background: var(--bg-3) !important; }

.hero {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    padding: 60px 0;
}
.hero h1 {
    font-size: 3rem;
    margin-bottom: 16px;
    background: linear-gradient(180deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero .lead {
    font-size: 1.125rem;
    color: var(--text-2);
    margin-bottom: 48px;
}

.status-card {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: left;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.status-card h3 {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    margin-bottom: 16px;
    font-weight: 500;
}
.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.status-row:last-child { border-bottom: none; }
.status-label { color: var(--text-2); }
.status-value { color: var(--text-0); font-family: var(--font-mono); font-size: 13px; }
.status-value.ok  { color: var(--ok); }
.status-value.err { color: var(--err); }

/* ============ AUTH LAYOUT ============ */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at top, #26262b 0%, #18181b 60%);
    padding: 24px;
}
.auth-wrap { width: 100%; max-width: 420px; text-align: center; }
.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    color: var(--text-0);
    font-weight: 600;
}
.auth-card {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    text-align: left;
    box-shadow: var(--shadow-lg);
}
.auth-title { font-size: 1.5rem; margin-bottom: 6px; }
.auth-subtitle { color: var(--text-3); font-size: 14px; margin-bottom: 28px; }
.auth-alt { text-align: center; margin-top: 24px; font-size: 13px; color: var(--text-3); }
.auth-alt a { color: var(--text-0); font-weight: 500; }
.auth-alt a:hover { text-decoration: underline; }
.auth-foot { margin-top: 32px; color: var(--text-4); font-size: 12px; }

/* ============ FORMS ============ */
.form-group { margin-bottom: 18px; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-2);
    font-weight: 500;
}
.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    color: var(--text-0);
    font-size: 14px;
    font-family: inherit;
    transition: border-color .15s, background .15s;
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--text-3);
    background: var(--bg-3);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-4); }
.form-input.has-error, .form-textarea.has-error, .form-select.has-error { border-color: var(--err); }
.form-error { margin-top: 6px; font-size: 12px; color: var(--err); }
.form-hint { margin-top: 6px; font-size: 12px; color: var(--text-4); }
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    align-items: center;
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    background: var(--text-0);
    color: var(--bg-0);
    border: 1px solid var(--text-0);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    font-family: inherit;
    white-space: nowrap;
}
.btn:hover { background: var(--text-1); color: var(--bg-0); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-block { width: 100%; }
.btn-secondary {
    background: transparent;
    color: var(--text-0);
    border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-3); color: var(--text-0); border-color: var(--border-hover); }
.btn-danger {
    background: transparent;
    color: var(--err);
    border-color: var(--border-strong);
}
.btn-danger:hover { background: rgba(252,165,165,.08); border-color: var(--err); }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ============ APP SHELL ============ */
.app-body { background: var(--bg-0); min-height: 100vh; }
.app-shell { display: flex; min-height: 100vh; }

/* Mobil sidebar açıldığında body scroll lock */
body.sidebar-open { overflow: hidden; }

/* Sidebar overlay (mobil) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 39;
    backdrop-filter: blur(2px);
}
body.sidebar-open .sidebar-overlay { display: block; }

.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-1);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 40;
    transition: transform .25s ease;
}
.sidebar-brand {
    padding: 0 22px;
    border-bottom: 1px solid var(--border);
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.sidebar-nav {
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.sidebar-bottom {
    margin-top: auto;
    border-top: 1px solid var(--border);
}
.nav-section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-4);
    padding: 8px 12px 6px;
    font-weight: 600;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 11px;
    border-radius: var(--radius-sm);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
    transition: all .15s;
    cursor: pointer;
}
.nav-link:hover { background: var(--bg-3); color: var(--text-0); }
.nav-link.active { background: var(--bg-3); color: var(--text-0); }
.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: var(--text-3);
    flex-shrink: 0;
    transition: color .15s;
}
.nav-icon svg {
    width: 16px;
    height: 16px;
}
.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
    color: var(--text-0);
}
.nav-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: calc(100% - var(--sidebar-w));
    min-width: 0;
}

.app-topbar {
    height: var(--topbar-h);
    border-bottom: 1px solid var(--border);
    background: rgba(24, 24, 27, .85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 30;
    gap: 16px;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }

/* Hamburger button (mobilde görünür) */
.menu-toggle {
    display: none;
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    transition: all .15s;
    padding: 0;
}
.menu-toggle:hover { background: var(--bg-2); border-color: var(--border-hover); }
.menu-toggle span {
    width: 16px;
    height: 1.5px;
    background: var(--text-1);
    border-radius: 2px;
    transition: all .2s;
}
body.sidebar-open .menu-toggle span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
body.sidebar-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.sidebar-open .menu-toggle span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.page-title { font-size: 14px; font-weight: 500; color: var(--text-2); }

.user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 14px 6px 6px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    transition: all .15s;
    cursor: pointer;
}
.user-chip:hover { background: var(--bg-2); border-color: var(--border-hover); }
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-4);
    color: var(--text-0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}
.user-meta { line-height: 1.2; }
.user-name { color: var(--text-0); font-size: 13px; font-weight: 500; }
.user-email { color: var(--text-4); font-size: 11px; }

.app-content {
    padding: 32px 40px;
    width: 100%;
    flex: 1;
}

/* ============ PAGE HEADER ============ */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.welcome-block, .page-header-text { flex: 1; min-width: 240px; }
.page-headline { font-size: 1.75rem; margin-bottom: 6px; }
.page-sub { color: var(--text-3); font-size: 14px; margin: 0; }
.page-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* Geri linki */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-3);
    font-size: 13px;
    margin-bottom: 12px;
    transition: color .15s;
}
.back-link:hover { color: var(--text-0); }

/* ============ DASHBOARD ============ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all .2s;
}
.stat-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.stat-label {
    font-size: 11px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    margin-bottom: 12px;
}
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-0);
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.stat-foot { font-size: 12px; color: var(--text-4); }

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.dash-panel {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.dash-panel-wide { grid-column: 1 / -1; }
.panel-head {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.panel-title { font-size: 14px; font-weight: 600; color: var(--text-0); margin: 0; }
.panel-link { font-size: 12px; color: var(--text-3); transition: color .15s; }
.panel-link:hover { color: var(--text-0); }
.panel-body {
    padding: 24px 22px;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state { text-align: center; padding: 40px 20px; }
.empty-mark { font-size: 32px; color: var(--text-4); margin-bottom: 14px; }
.empty-title { color: var(--text-1); font-weight: 500; margin-bottom: 4px; font-size: 15px; }
.empty-text { color: var(--text-4); font-size: 13px; margin-bottom: 20px; }

/* ============ Panel List (Dashboard) ============ */
.panel-list {
    display: flex;
    flex-direction: column;
}
.panel-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: background .15s;
}
.panel-item:last-child { border-bottom: none; }
.panel-item:hover { background: var(--bg-2); }
.panel-item-main {
    flex: 1;
    min-width: 0;
}
.panel-item-title {
    color: var(--text-0);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.panel-item-sub {
    color: var(--text-4);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.panel-item-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}
.panel-item-meta {
    color: var(--text-3);
    font-size: 11px;
    font-family: var(--font-mono);
}

/* ============ Activity Feed ============ */
.activity-list {
    padding: 8px 22px;
}
.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-3);
    margin-top: 7px;
    flex-shrink: 0;
}
.activity-body { flex: 1; min-width: 0; }
.activity-text {
    color: var(--text-1);
    font-size: 13px;
    line-height: 1.5;
}
.activity-text strong {
    color: var(--text-0);
    font-weight: 600;
}
.activity-text a {
    color: var(--text-0);
    text-decoration: underline;
    text-decoration-color: var(--border-strong);
}
.activity-text a:hover { text-decoration-color: var(--text-2); }
.activity-time {
    color: var(--text-4);
    font-size: 11px;
    margin-top: 2px;
    font-family: var(--font-mono);
}

.placeholder-card {
    background: var(--bg-1);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 60px 24px;
    text-align: center;
}
.placeholder-mark { font-size: 36px; color: var(--text-4); margin-bottom: 16px; }
.placeholder-title { color: var(--text-1); font-size: 16px; font-weight: 500; margin-bottom: 8px; }
.placeholder-text { color: var(--text-4); font-size: 13px; max-width: 380px; margin: 0 auto; }

/* ============ PROJECTS LIST TABLE ============ */
.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.toolbar-search {
    flex: 1;
    min-width: 200px;
    max-width: 360px;
    position: relative;
}
.toolbar-search input {
    width: 100%;
    padding: 9px 14px;
    background: var(--bg-1);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    color: var(--text-0);
    font-size: 13px;
    font-family: inherit;
}
.toolbar-search input:focus {
    outline: none;
    border-color: var(--text-3);
    background: var(--bg-2);
}
.toolbar-filters { display: flex; gap: 8px; }
.filter-pill {
    padding: 7px 14px;
    background: var(--bg-1);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: var(--text-2);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
}
.filter-pill:hover { background: var(--bg-3); color: var(--text-0); }
.filter-pill.active { background: var(--text-0); color: var(--bg-0); border-color: var(--text-0); }

.data-table-wrap {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.data-table thead th {
    text-align: left;
    padding: 14px 20px;
    color: var(--text-3);
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
    background: var(--bg-2);
}
.data-table tbody td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text-1);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr {
    transition: background .15s;
    cursor: pointer;
}
.data-table tbody tr:hover { background: var(--bg-2); }
.data-table tbody tr:hover .row-name { color: var(--text-0); }

.row-name {
    color: var(--text-1);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    transition: color .15s;
}
.row-desc {
    color: var(--text-4);
    font-size: 12px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    max-width: 320px;
}

/* ============ BADGES (durum / öncelik) ============ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    text-transform: capitalize;
    border: 1px solid var(--border-strong);
    background: var(--bg-2);
    color: var(--text-2);
    white-space: nowrap;
}
.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.badge-planning  { color: var(--info);  border-color: rgba(147,197,253,.25); }
.badge-active    { color: var(--ok);    border-color: rgba(134,239,172,.25); }
.badge-paused    { color: var(--warn);  border-color: rgba(252,211,77,.25); }
.badge-completed { color: var(--text-2); border-color: var(--border-strong); }
.badge-archived  { color: var(--text-4); border-color: var(--border); }

.badge-low      { color: var(--text-3); }
.badge-medium   { color: var(--info); border-color: rgba(147,197,253,.25); }
.badge-high     { color: var(--warn); border-color: rgba(252,211,77,.25); }
.badge-critical { color: var(--err); border-color: rgba(252,165,165,.3); }
.badge-urgent   { color: var(--err); border-color: rgba(252,165,165,.3); }

/* ============ PROGRESS BAR ============ */
.progress {
    width: 100%;
    min-width: 80px;
    max-width: 140px;
    height: 6px;
    background: var(--bg-3);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}
.progress-fill {
    height: 100%;
    background: var(--text-1);
    border-radius: 999px;
    transition: width .3s;
}
.progress-label {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 4px;
    font-family: var(--font-mono);
}

/* ============ PROJECT DETAIL ============ */
.project-header {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 24px;
}
.project-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.project-header-main { flex: 1; min-width: 240px; }
.project-name {
    font-size: 1.75rem;
    margin-bottom: 6px;
    color: var(--text-0);
    letter-spacing: -0.02em;
}
.project-desc {
    color: var(--text-3);
    font-size: 14px;
    margin: 0 0 16px;
}
.project-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.project-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.project-meta-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-4);
    font-weight: 600;
}
.project-meta-value {
    color: var(--text-1);
    font-size: 13px;
    font-weight: 500;
}

/* Project tabs */
.tab-bar {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.tab {
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: var(--text-3);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all .15s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    font-family: inherit;
}
.tab:hover { color: var(--text-1); }
.tab.active { color: var(--text-0); border-bottom-color: var(--text-0); }

/* ============ ALERT (flash mesajlar) ============ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    background: var(--bg-2);
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-1);
}
.alert-success { border-color: rgba(134,239,172,.3); color: var(--ok); }
.alert-error { border-color: rgba(252,165,165,.3); color: var(--err); }

/* ============ 404 ============ */
.error-page { text-align: center; padding: 80px 20px; }
.error-code {
    font-size: 6rem;
    font-weight: 700;
    color: var(--text-4);
    line-height: 1;
    margin-bottom: 16px;
    font-family: var(--font-mono);
}

/* ============ KANBAN ============ */
.kanban {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: flex-start;
}
.kanban-col {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}
.kanban-col-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-2);
}
.kanban-col-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.kanban-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-3);
}
.kanban-dot-todo        { background: var(--text-3); }
.kanban-dot-in_progress { background: var(--info); }
.kanban-dot-review      { background: var(--warn); }
.kanban-dot-done        { background: var(--ok); }

.kanban-col-count {
    font-size: 11px;
    color: var(--text-3);
    background: var(--bg-3);
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
}

.kanban-col-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-height: 100px;
}

.kanban-empty {
    text-align: center;
    color: var(--text-4);
    font-size: 12px;
    padding: 24px 0;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
}

/* ============ TASK CARD ============ */
.task-card {
    background: var(--bg-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 12px 14px;
    transition: all .15s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.task-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
}
.task-card-title {
    color: var(--text-0);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    display: block;
}
.task-card-title:hover { color: var(--text-2); }
.task-card-desc {
    color: var(--text-4);
    font-size: 12px;
    line-height: 1.4;
}
.task-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.task-due {
    color: var(--text-3);
    font-size: 11px;
    font-family: var(--font-mono);
}
.task-card-actions {
    margin-top: 4px;
}
.task-status-select {
    width: 100%;
    padding: 6px 10px;
    background: var(--bg-3);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-1);
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
}
.task-status-select:hover {
    background: var(--bg-4);
}
.task-status-select:focus {
    outline: none;
    border-color: var(--text-3);
}

/* ============ MODAL ============ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.modal.open {
    display: flex;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .7);
    backdrop-filter: blur(4px);
}
.modal-card {
    position: relative;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
}
.modal-head {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-title {
    font-size: 16px;
    margin: 0;
    color: var(--text-0);
}
.modal-close {
    background: transparent;
    border: none;
    color: var(--text-3);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
.modal-close:hover {
    background: var(--bg-3);
    color: var(--text-0);
}
.modal-body {
    padding: 24px;
}

/* Kanban responsive */
@media (max-width: 1100px) {
    .kanban { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .kanban { grid-template-columns: 1fr; }
}

    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-grid { grid-template-columns: 1fr; }
    .app-content { padding: 28px 28px; }
}

@media (max-width: 768px) {
    /* Sidebar kapalı, hamburger ile aç */
    .sidebar { transform: translateX(-100%); }
    body.sidebar-open .sidebar { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .menu-toggle { display: flex; }
    .app-main { margin-left: 0; width: 100%; }
    .app-content { padding: 24px 20px; }
    .app-topbar { padding: 0 20px; }
    .user-meta { display: none; }
    .stat-grid { grid-template-columns: 1fr; }
    h1 { font-size: 1.5rem; }
    .hero h1 { font-size: 2rem; }
    .form-row { grid-template-columns: 1fr; }
    .data-table thead { display: none; }
    .data-table tbody td { display: block; padding: 8px 16px; border: none; }
    .data-table tbody tr {
        display: block;
        padding: 16px 0;
        border-bottom: 1px solid var(--border);
    }
    .row-desc { max-width: 100%; }
    .page-header { flex-direction: column; }
    .page-actions { width: 100%; }
}


/* ============ Sidebar scrollbar - ince, şık ============ */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}
.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 999px;
    transition: background .2s;
}
.sidebar:hover::-webkit-scrollbar-thumb {
    background: var(--border-strong);
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}


/* ============ MILESTONE TIMELINE ============ */
.milestone-timeline {
    position: relative;
    padding-left: 4px;
}
.milestone-timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 12px;
    bottom: 12px;
    width: 1px;
    background: var(--border-strong);
}

.milestone-item {
    position: relative;
    display: flex;
    gap: 18px;
    padding-bottom: 18px;
}
.milestone-item:last-child { padding-bottom: 0; }

.milestone-marker {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    padding-top: 18px;
}
.milestone-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-1);
    border: 2px solid var(--text-4);
    margin-left: 6px;
    transition: all .2s;
}
.milestone-in_progress .milestone-dot { border-color: var(--info); background: var(--info); }
.milestone-completed   .milestone-dot { border-color: var(--ok);   background: var(--ok); }
.milestone-cancelled   .milestone-dot { border-color: var(--text-4); background: var(--bg-1); opacity: .5; }

.milestone-card {
    flex: 1;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    transition: border-color .15s;
}
.milestone-card:hover { border-color: var(--border-hover); }
.milestone-completed .milestone-card { opacity: .75; }
.milestone-cancelled .milestone-card { opacity: .5; }

.milestone-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 8px;
}
.milestone-title-block { flex: 1; min-width: 0; }
.milestone-title {
    font-size: 15px;
    color: var(--text-0);
    margin: 0 0 8px;
    font-weight: 600;
}
.milestone-completed .milestone-title { text-decoration: line-through; color: var(--text-2); }
.milestone-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.milestone-date {
    color: var(--text-3);
    font-size: 12px;
    font-family: var(--font-mono);
}
.milestone-desc {
    color: var(--text-2);
    font-size: 13px;
    margin: 8px 0 0;
    line-height: 1.5;
}

.milestone-progress {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.milestone-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 6px;
}

/* Milestone status badges */
.badge-m-pending     { color: var(--text-3); }
.badge-m-in_progress { color: var(--info); border-color: rgba(147,197,253,.25); }
.badge-m-completed   { color: var(--ok);   border-color: rgba(134,239,172,.25); }
.badge-m-cancelled   { color: var(--text-4); }

/* Milestone action buttons */
.milestone-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.milestone-actions .task-status-select {
    width: auto;
    min-width: 120px;
}
.icon-btn {
    width: 30px;
    height: 30px;
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-2);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all .15s;
    padding: 0;
    font-family: inherit;
}
.icon-btn:hover {
    background: var(--bg-3);
    color: var(--text-0);
    border-color: var(--border-hover);
}
.icon-btn-danger:hover {
    color: var(--err);
    border-color: var(--err);
}

/* ============ NOTES LAYOUT ============ */
.notes-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 16px;
    min-height: 600px;
}

.notes-list {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-height: 75vh;
    overflow-y: auto;
}

.notes-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-4);
}
.notes-empty .empty-mark { font-size: 28px; margin-bottom: 12px; }

.note-list-item {
    display: block;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: background .15s;
    border-left: 2px solid transparent;
}
.note-list-item:last-child { border-bottom: none; }
.note-list-item:hover { background: var(--bg-2); }
.note-list-item.active {
    background: var(--bg-2);
    border-left-color: var(--text-0);
}

.note-list-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}
.note-list-title {
    color: var(--text-0);
    font-size: 13.5px;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.note-pin-mark {
    color: var(--warn);
    font-size: 11px;
    flex-shrink: 0;
}

.note-list-preview {
    color: var(--text-3);
    font-size: 12px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 6px;
}
.note-list-date {
    color: var(--text-4);
    font-size: 11px;
    font-family: var(--font-mono);
}

/* SAĞ PANEL */
.notes-panel {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 40px;
    min-height: 500px;
}

.note-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-4);
    height: 100%;
    min-height: 400px;
}
.note-placeholder .empty-mark { font-size: 36px; margin-bottom: 16px; }
.note-placeholder .empty-title { color: var(--text-1); font-size: 15px; margin-bottom: 6px; font-weight: 500; }
.note-placeholder .empty-text { color: var(--text-4); font-size: 13px; margin-bottom: 20px; }

/* NOTE VIEWER */
.note-viewer-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 6px;
}
.note-viewer-title-block {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}
.note-viewer-title {
    font-size: 1.6rem;
    color: var(--text-0);
    margin: 0;
    letter-spacing: -0.02em;
}
.note-viewer-title-block .note-pin-mark {
    font-size: 18px;
}
.note-viewer-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.note-viewer-meta {
    color: var(--text-4);
    font-size: 12px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

/* Markdown çıktı stilleri */
.note-viewer-content {
    color: var(--text-1);
    font-size: 14px;
    line-height: 1.7;
}
.note-viewer-content h1,
.note-viewer-content h2,
.note-viewer-content h3,
.note-viewer-content h4 {
    color: var(--text-0);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}
.note-viewer-content h1 { font-size: 1.5rem; }
.note-viewer-content h2 { font-size: 1.25rem; }
.note-viewer-content h3 { font-size: 1.1rem; }
.note-viewer-content p { margin: 0 0 1em; }
.note-viewer-content strong { color: var(--text-0); font-weight: 600; }
.note-viewer-content em { color: var(--text-1); }
.note-viewer-content del { color: var(--text-4); }
.note-viewer-content a {
    color: var(--info);
    text-decoration: underline;
    text-decoration-color: rgba(147,197,253,.3);
}
.note-viewer-content a:hover { text-decoration-color: var(--info); }
.note-viewer-content ul,
.note-viewer-content ol {
    padding-left: 1.5em;
    margin: 0 0 1em;
}
.note-viewer-content li { margin-bottom: 0.3em; }
.note-viewer-content code {
    background: var(--bg-3);
    color: var(--text-0);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85em;
    border: 1px solid var(--border);
}
.note-viewer-content pre {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    overflow-x: auto;
    margin: 1em 0;
}
.note-viewer-content pre code {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 0.85em;
    color: var(--text-1);
}
.note-viewer-content blockquote {
    border-left: 3px solid var(--border-strong);
    padding-left: 16px;
    margin: 1em 0;
    color: var(--text-2);
    font-style: italic;
}
.note-viewer-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2em 0;
}

/* EDITOR */
.note-editor { display: block; }
.note-title-input {
    width: 100%;
    padding: 12px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    color: var(--text-0);
    font-size: 1.6rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    outline: none;
}
.note-title-input::placeholder { color: var(--text-4); }

.note-content-input {
    width: 100%;
    min-height: 360px;
    background: transparent;
    border: none;
    color: var(--text-1);
    font-size: 14px;
    font-family: var(--font-mono);
    line-height: 1.7;
    resize: vertical;
    outline: none;
    padding: 0;
}
.note-content-input::placeholder { color: var(--text-4); }

.note-editor-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 900px) {
    .notes-layout {
        grid-template-columns: 1fr;
    }
    .notes-list {
        max-height: 300px;
    }
}


/* ============ JOURNAL LAYOUT ============ */
.journal-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 16px;
    min-height: 600px;
}
.journal-list {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-height: 75vh;
    overflow-y: auto;
}

.journal-group-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-4);
    padding: 14px 18px 8px;
    font-weight: 600;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
}

.journal-list-item {
    display: block;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: background .15s;
    border-left: 2px solid transparent;
}
.journal-list-item:last-child { border-bottom: none; }
.journal-list-item:hover { background: var(--bg-2); }
.journal-list-item.active {
    background: var(--bg-2);
    border-left-color: var(--text-0);
}

.journal-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.journal-list-date {
    color: var(--text-2);
    font-size: 11px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}
.journal-list-title {
    color: var(--text-0);
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.journal-list-preview {
    color: var(--text-3);
    font-size: 12px;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 6px;
}
.journal-list-score {
    font-size: 11px;
    color: var(--text-4);
    font-family: var(--font-mono);
}

/* Mood dots & chips */
.mood-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-4);
    flex-shrink: 0;
}
.mood-great    { background: var(--ok); }
.mood-good     { background: var(--info); }
.mood-neutral  { background: var(--text-3); }
.mood-bad      { background: var(--warn); }
.mood-terrible { background: var(--err); }

.mood-chip,
.productivity-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid var(--border-strong);
    background: var(--bg-2);
    color: var(--text-2);
    white-space: nowrap;
}
.mood-chip.mood-great    { color: var(--ok);   border-color: rgba(134,239,172,.25); }
.mood-chip.mood-good     { color: var(--info); border-color: rgba(147,197,253,.25); }
.mood-chip.mood-neutral  { color: var(--text-2); }
.mood-chip.mood-bad      { color: var(--warn); border-color: rgba(252,211,77,.25); }
.mood-chip.mood-terrible { color: var(--err);  border-color: rgba(252,165,165,.3); }

/* Journal viewer head extras */
.journal-viewer-date-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.journal-viewer-date {
    color: var(--text-3);
    font-size: 13px;
    font-family: var(--font-mono);
    text-transform: capitalize;
}

/* Journal form top (date/mood/productivity) */
.journal-form-top {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

@media (max-width: 900px) {
    .journal-layout {
        grid-template-columns: 1fr;
    }
    .journal-list {
        max-height: 300px;
    }
    .journal-form-top {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}



/* ============ EXPENSES ============ */
.expense-list-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.expense-amount {
    color: var(--text-0);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-mono);
}

.expense-amount-display {
    font-size: 2rem;
    color: var(--text-0);
    font-weight: 700;
    margin-top: 16px;
    letter-spacing: -0.02em;
}
.expense-amount-display .muted {
    font-size: 1rem;
    font-weight: 400;
}

/* Payment section */
.payment-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.payment-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}
.payment-section-title {
    font-size: 14px;
    color: var(--text-0);
    margin: 0;
    font-weight: 600;
}

.payment-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.payment-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all .15s;
}
.payment-row:hover { border-color: var(--border-hover); }
.payment-paid {
    opacity: .55;
}
.payment-paid .payment-period { text-decoration: line-through; }
.payment-overdue {
    border-color: rgba(252,165,165,.25);
}
.payment-overdue .payment-period {
    color: var(--err);
}

.payment-check {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: transparent;
    border: 1.5px solid var(--border-hover);
    cursor: pointer;
    color: var(--bg-0);
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    flex-shrink: 0;
    font-family: inherit;
    padding: 0;
}
.payment-check:hover {
    border-color: var(--text-2);
}
.payment-paid .payment-check {
    background: var(--ok);
    border-color: var(--ok);
}
.payment-info {
    flex: 1;
    min-width: 0;
}
.payment-period {
    color: var(--text-0);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-mono);
    margin-bottom: 2px;
}
.payment-due {
    color: var(--text-3);
    font-size: 11px;
}
.payment-amount {
    color: var(--text-0);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-mono);
    flex-shrink: 0;
}


/* ============ CLIENT DETAY ============ */
.client-finance-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
    padding: 18px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.client-finance-item {
    text-align: center;
}
.client-finance-label {
    font-size: 11px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
    font-weight: 500;
}
.client-finance-value {
    font-size: 1.1rem;
    color: var(--text-0);
    font-weight: 700;
    font-family: var(--font-mono);
}

.info-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.info-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    margin-bottom: 14px;
    font-weight: 600;
}
.info-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.info-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 12px;
    font-size: 13px;
    align-items: start;
}
.info-label {
    color: var(--text-3);
    font-weight: 500;
}
.info-value {
    color: var(--text-1);
    word-break: break-word;
}
.info-value a {
    color: var(--info);
    text-decoration: underline;
    text-decoration-color: rgba(147,197,253,.3);
}
.info-notes {
    color: var(--text-1);
    font-size: 13px;
    line-height: 1.6;
    background: var(--bg-2);
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

@media (max-width: 700px) {
    .client-finance-summary { grid-template-columns: 1fr; }
    .info-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ============ RECEIVABLES ============ */
.receivable-amounts {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-top: 24px;
}
.receivable-amount-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.receivable-label {
    font-size: 11px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
    margin-bottom: 4px;
}
.receivable-value {
    font-size: 1.15rem;
    color: var(--text-0);
    font-weight: 700;
    font-family: var(--font-mono);
}

/* Receivable status badges */
.badge-rcv-pending   { color: var(--text-3); }
.badge-rcv-partial   { color: var(--info);   border-color: rgba(147,197,253,.25); }
.badge-rcv-paid      { color: var(--ok);     border-color: rgba(134,239,172,.25); }
.badge-rcv-overdue   { color: var(--err);    border-color: rgba(252,165,165,.3); }
.badge-rcv-cancelled { color: var(--text-4); opacity: .6; }

@media (max-width: 700px) {
    .receivable-amount-row { grid-template-columns: 1fr; }
}

/* ============ RECEIVABLE PERIODS ============ */
.period-block {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all .15s;
    margin-bottom: 6px;
}
.period-block:hover { border-color: var(--border-hover); }
.period-block.payment-paid { opacity: .6; }
.period-block.payment-paid .payment-period { text-decoration: line-through; }
.period-block.payment-overdue { border-color: rgba(252,165,165,.3); }
.period-block.payment-partial { border-color: rgba(147,197,253,.3); }
.period-block.payment-cancelled { opacity: .4; }

.period-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
}



/* ============ RECEIVABLE TABLE + ACCORDION ============ */
.receivable-table tbody tr.receivable-row {
    cursor: pointer;
}
.receivable-table tbody tr.receivable-row:hover {
    background: var(--bg-2);
}
.receivable-table tbody tr.receivable-detail-row:hover {
    background: transparent;
}
.row-toggle {
    width: 30px;
    text-align: center;
    color: var(--text-3);
}
.toggle-icon {
    display: inline-block;
    font-size: 12px;
    transition: color .15s;
}
.receivable-row:hover .toggle-icon {
    color: var(--text-0);
}

/* Detay satırı */
.receivable-detail-row td {
    padding: 0 !important;
    background: var(--bg-0);
    border-bottom: 1px solid var(--border) !important;
}
.receivable-detail {
    padding: 24px 28px;
    background: var(--bg-1);
    border-left: 3px solid var(--text-3);
    margin: 0 12px 12px;
    border-radius: var(--radius);
}

/* Üst bilgi grid */
.rcv-detail-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.rcv-info-grid {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    flex: 1;
}
.rcv-info-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.rcv-info-label {
    font-size: 10px;
    color: var(--text-4);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.rcv-info-value {
    color: var(--text-0);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-mono);
}
.rcv-info-block .rcv-info-value:not([class*="font-mono"]) {
    font-family: inherit;
}

.rcv-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.rcv-description {
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.6;
    padding: 14px 16px;
    background: var(--bg-2);
    border-radius: var(--radius);
    margin-bottom: 18px;
}

/* Dönemler */
.rcv-periods-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.rcv-periods-title {
    font-size: 11px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.rcv-periods-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rcv-period {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .15s;
}
.rcv-period:hover { border-color: var(--border-hover); }
.rcv-period-paid { opacity: .55; }
.rcv-period-paid .rcv-period-label { text-decoration: line-through; }
.rcv-period-overdue { border-color: rgba(252,165,165,.3); }
.rcv-period-partial { border-color: rgba(147,197,253,.3); }
.rcv-period-cancelled { opacity: .35; }

.rcv-period-info {
    flex: 1;
    min-width: 0;
}
.rcv-period-label {
    color: var(--text-0);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}
.rcv-period-meta {
    color: var(--text-3);
    font-size: 11px;
}
.rcv-period-amount {
    color: var(--text-0);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-mono);
    flex-shrink: 0;
}

/* Mini buton */
.btn-mini {
    padding: 5px 12px;
    background: var(--bg-3);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-1);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
    white-space: nowrap;
}
.btn-mini:hover {
    background: var(--bg-4);
    color: var(--text-0);
    border-color: var(--border-hover);
}

.rcv-note-block {
    margin-top: 18px;
    padding: 12px 16px;
    background: var(--bg-2);
    border-radius: var(--radius);
    color: var(--text-2);
    font-size: 13px;
    line-height: 1.5;
}
.rcv-note-block strong {
    color: var(--text-1);
}

/* Mobil */
@media (max-width: 768px) {
    .receivable-table thead { display: none; }
    .receivable-table tbody tr.receivable-row {
        display: block;
        padding: 12px;
        border-bottom: 1px solid var(--border);
    }
    .receivable-table tbody tr.receivable-row td {
        display: block;
        padding: 4px 0;
        border: none;
    }
    .rcv-detail-top { flex-direction: column; }
    .rcv-info-grid { gap: 16px; }
    .rcv-period { flex-wrap: wrap; }
}


/* ============ AI CHAT ============ */
.ai-shell {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--topbar-h) - 48px);
    max-height: calc(100vh - var(--topbar-h) - 48px);
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-1);
    flex-shrink: 0;
}
.ai-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ai-avatar-lg {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-3);
    border: 1px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-1);
}
.ai-title {
    color: var(--text-0);
    font-size: 14px;
    font-weight: 600;
}
.ai-subtitle {
    color: var(--text-3);
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ai-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 6px rgba(134,239,172,.5);
}

/* Messages alanı */
.ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 28px 22px;
    scroll-behavior: smooth;
}

.ai-messages::-webkit-scrollbar { width: 6px; }
.ai-messages::-webkit-scrollbar-track { background: transparent; }
.ai-messages::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }

/* Welcome ekran */
.ai-welcome {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    padding: 60px 20px 40px;
}
.ai-welcome-icon {
    font-size: 48px;
    color: var(--text-3);
    margin-bottom: 16px;
    background: linear-gradient(180deg, #fff 0%, #71717a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.ai-welcome-title {
    font-size: 1.75rem;
    margin-bottom: 8px;
    color: var(--text-0);
    letter-spacing: -0.02em;
}
.ai-welcome-text {
    color: var(--text-3);
    font-size: 14px;
    margin-bottom: 36px;
}

.ai-suggestions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    text-align: left;
    max-width: 580px;
    margin: 0 auto;
}
.ai-suggestion {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all .15s;
    text-align: left;
    font-family: inherit;
}
.ai-suggestion:hover {
    background: var(--bg-3);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}
.ai-suggestion-icon {
    color: var(--text-3);
    font-size: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}
.ai-suggestion-text { flex: 1; min-width: 0; }
.ai-suggestion-title {
    color: var(--text-0);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
}
.ai-suggestion-sub {
    color: var(--text-4);
    font-size: 11px;
}

/* Mesajlar */
.ai-msg {
    display: flex;
    gap: 14px;
    max-width: 820px;
    margin: 0 auto 24px;
    align-items: flex-start;
}
.ai-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-3);
    border: 1px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-1);
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
    text-transform: uppercase;
}
.ai-msg-user .ai-msg-avatar {
    background: var(--text-0);
    color: var(--bg-0);
    border-color: var(--text-0);
}
.ai-msg-bubble {
    flex: 1;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    color: var(--text-1);
    font-size: 14px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}
.ai-msg-user .ai-msg-bubble {
    background: var(--bg-3);
}

/* Bubble içindeki markdown */
.ai-msg-bubble strong { color: var(--text-0); font-weight: 600; }
.ai-msg-bubble em { color: var(--text-1); }
.ai-msg-bubble code {
    background: var(--bg-0);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 12px;
    border: 1px solid var(--border);
    color: var(--text-0);
}
.ai-msg-bubble pre {
    background: var(--bg-0);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    overflow-x: auto;
    margin: 10px 0;
}
.ai-msg-bubble pre code {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 12px;
}
.ai-msg-bubble ul {
    padding-left: 20px;
    margin: 8px 0;
}
.ai-msg-bubble li { margin-bottom: 4px; }
.ai-msg-bubble a {
    color: var(--info);
    text-decoration: underline;
    text-decoration-color: rgba(147,197,253,.3);
}
.ai-msg-bubble a:hover { text-decoration-color: var(--info); }

/* Typing animation */
.ai-typing {
    display: inline-flex;
    gap: 4px;
    padding: 18px;
    align-items: center;
}
.ai-typing .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-3);
    animation: aiBounce 1.4s infinite;
}
.ai-typing .dot:nth-child(2) { animation-delay: .2s; }
.ai-typing .dot:nth-child(3) { animation-delay: .4s; }
@keyframes aiBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: .4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* Input alanı */
.ai-input-wrap {
    padding: 16px 22px 18px;
    border-top: 1px solid var(--border);
    background: var(--bg-1);
    flex-shrink: 0;
}
.ai-input-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    background: var(--bg-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 8px 8px 8px 16px;
    transition: border-color .15s;
}
.ai-input-form:focus-within {
    border-color: var(--text-3);
    background: var(--bg-3);
}
.ai-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-0);
    font-size: 14px;
    font-family: inherit;
    line-height: 1.5;
    resize: none;
    padding: 8px 0;
    outline: none;
    max-height: 200px;
}
.ai-input::placeholder { color: var(--text-4); }

.ai-send-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: var(--text-0);
    color: var(--bg-0);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    flex-shrink: 0;
}
.ai-send-btn:hover:not(:disabled) {
    background: var(--text-1);
    transform: translateY(-1px);
}
.ai-send-btn:disabled {
    background: var(--bg-4);
    color: var(--text-4);
    cursor: not-allowed;
}

.ai-input-hint {
    text-align: center;
    color: var(--text-4);
    font-size: 11px;
    margin-top: 10px;
}

/* Mobil */
@media (max-width: 768px) {
    .ai-shell {
        height: calc(100vh - var(--topbar-h) - 24px);
    }
    .ai-suggestions { grid-template-columns: 1fr; }
    .ai-welcome { padding: 30px 16px 20px; }
    .ai-welcome-title { font-size: 1.4rem; }
    .ai-msg { gap: 10px; }
    .ai-messages { padding: 20px 14px; }
    .ai-input-wrap { padding: 12px 14px; }
}


/* ============ ARCHIVE GRID ============ */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.archive-card {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all .2s;
    position: relative;
    display: flex;
    flex-direction: column;
}
.archive-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.archive-pin {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,.6);
    color: var(--warn);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.archive-preview {
    display: block;
    width: 100%;
    height: 160px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    position: relative;
    text-decoration: none;
}
.archive-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.archive-preview:hover img {
    transform: scale(1.05);
}

.archive-preview-image { background: var(--bg-0); }
.archive-preview-pdf,
.archive-preview-doc,
.archive-preview-sheet,
.archive-preview-zip,
.archive-preview-file {
    display: flex;
    align-items: center;
    justify-content: center;
}

.archive-file-icon {
    color: var(--text-3);
    font-size: 24px;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
    transition: color .15s;
}
.archive-preview:hover .archive-file-icon {
    color: var(--text-1);
}

.archive-card-body {
    padding: 14px 16px 10px;
    flex: 1;
}
.archive-card-title {
    color: var(--text-0);
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    min-height: 2.6em;
}
.archive-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.archive-card-size {
    color: var(--text-3);
    font-size: 11px;
    font-family: var(--font-mono);
}
.archive-card-tags {
    color: var(--text-4);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}
.archive-card-date {
    color: var(--text-4);
    font-size: 11px;
    font-family: var(--font-mono);
}

.archive-card-actions {
    display: flex;
    gap: 4px;
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    background: var(--bg-2);
}
.archive-card-actions .icon-btn {
    width: 28px;
    height: 28px;
    font-size: 13px;
}

@media (max-width: 600px) {
    .archive-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    .archive-preview { height: 120px; }
}









