/* =====================================================================
   ProjectHub Europe - Ana Stil Dosyası
   Modern, responsive, tek dosya (build adımı yok).
   ===================================================================== */

:root {
    --brand: #4f46e5;
    --brand-600: #4338ca;
    --brand-700: #3730a3;
    --brand-soft: #eef2ff;

    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;

    --text: #0f172a;
    --text-2: #475569;
    --text-3: #94a3b8;

    --sidebar-bg: #0f172a;
    --sidebar-bg-2: #1e293b;
    --sidebar-text: #cbd5e1;
    --sidebar-text-dim: #64748b;
    --sidebar-active: #6366f1;

    --radius: 14px;
    --radius-sm: 9px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
    --shadow: 0 4px 14px rgba(15, 23, 42, .07);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, .16);

    --sidebar-w: 264px;

    --green: #16a34a; --green-bg:#dcfce7;
    --red: #dc2626;   --red-bg:#fee2e2;
    --amber:#d97706;  --amber-bg:#fef3c7;
    --blue:#2563eb;   --blue-bg:#dbeafe;
    --indigo:#4f46e5; --indigo-bg:#e0e7ff;
    --teal:#0d9488;   --teal-bg:#ccfbf1;
    --gray:#475569;   --gray-bg:#f1f5f9;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14.5px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .4em; color: var(--text); font-weight: 700; line-height: 1.25; }
p { margin: 0 0 1em; }
.icon { display: inline-block; vertical-align: middle; flex: none; }

/* ---------------- App Shell ---------------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--sidebar-bg), #111827);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 40;
    transition: transform .25s ease;
}
.sidebar__brand {
    display: flex; align-items: center; gap: 11px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.sidebar__logo {
    width: 38px; height: 38px; border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #22d3ee);
    display: grid; place-items: center;
    color: #fff; font-weight: 800; font-size: 17px;
    box-shadow: 0 6px 16px rgba(99,102,241,.4);
}
.sidebar__title { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.1; }
.sidebar__subtitle { font-size: 11px; color: var(--sidebar-text-dim); }

.sidebar__project {
    margin: 14px 14px 6px;
    padding: 12px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 12px;
}
.sidebar__project-name { color:#fff; font-weight:700; font-size:13.5px; }
.sidebar__project-meta { color: var(--sidebar-text-dim); font-size:11.5px; margin-top:2px; }

.sidebar__nav { flex: 1; overflow-y: auto; padding: 8px 12px 24px; }
.sidebar__nav::-webkit-scrollbar { width: 8px; }
.sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 8px; }

.nav-group { margin-top: 14px; }
.nav-group__label {
    font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em;
    color: var(--sidebar-text-dim); font-weight: 700;
    padding: 4px 12px; margin-bottom: 2px;
}
.nav-item {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px; margin: 2px 0;
    border-radius: 9px;
    color: var(--sidebar-text);
    font-size: 13.5px; font-weight: 500;
    transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255,255,255,.07); color:#fff; text-decoration: none; }
.nav-item.active { background: var(--sidebar-active); color:#fff; box-shadow: 0 6px 16px rgba(99,102,241,.35); }
.nav-item .icon { opacity: .85; }
.nav-item.active .icon { opacity: 1; }

.sidebar__footer { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.07); }
.user-chip { display:flex; align-items:center; gap:10px; }
.user-chip__avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg,#6366f1,#22d3ee);
    color:#fff; font-weight:700; font-size:13px;
    display:grid; place-items:center; flex:none;
}
.user-chip__name { color:#fff; font-size:13px; font-weight:600; }
.user-chip__email { color: var(--sidebar-text-dim); font-size:11px; }

/* ---------------- Main ---------------- */
.main {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.topbar {
    position: sticky; top: 0; z-index: 30;
    background: rgba(255,255,255,.85);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--border);
    padding: 12px 26px;
    display: flex; align-items: center; gap: 16px;
}
.topbar__toggle {
    display: none; background: none; border: none; cursor: pointer;
    color: var(--text-2); padding: 6px; border-radius: 8px;
}
.breadcrumb { display:flex; align-items:center; gap:7px; font-size:13px; color: var(--text-3); flex-wrap: wrap; }
.breadcrumb a { color: var(--text-2); font-weight:500; }
.breadcrumb .sep { color: var(--text-3); display:flex; }
.breadcrumb .current { color: var(--text); font-weight:600; }
.topbar__spacer { flex: 1; }
.topbar__actions { display:flex; align-items:center; gap:10px; }

.content { padding: 26px; max-width: 1360px; width: 100%; margin: 0 auto; }

.page-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; }
.page-head .subtitle { color: var(--text-2); font-size: 14px; }

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 15px; border-radius: 10px;
    border: 1px solid transparent; cursor: pointer;
    font-size: 13.5px; font-weight: 600; font-family: inherit;
    transition: all .15s; white-space: nowrap; text-decoration: none;
    background: var(--surface); color: var(--text);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color:#fff; box-shadow: 0 6px 16px rgba(79,70,229,.28); }
.btn-primary:hover { background: var(--brand-600); }
.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--red); color:#fff; }
.btn-danger:hover { filter: brightness(.94); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------------- Cards ---------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.card__head {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.card__head h3 { margin: 0; font-size: 15.5px; }
.card__body { padding: 20px; }
.card__body.tight { padding: 0; }

/* Stat cards */
.stats-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat {
    background: var(--surface); border:1px solid var(--border); border-radius: var(--radius);
    padding: 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat__icon {
    width: 42px; height: 42px; border-radius: 11px; display:grid; place-items:center; margin-bottom: 12px;
}
.stat__value { font-size: 27px; font-weight: 800; line-height: 1; color: var(--text); }
.stat__label { color: var(--text-2); font-size: 13px; margin-top: 6px; }
.stat__sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }

/* Dashboard grid */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-main { grid-template-columns: 2fr 1fr; align-items: start; }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
    text-align: left; padding: 11px 16px; color: var(--text-2);
    font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em;
    border-bottom: 1px solid var(--border); background: var(--surface-2);
    white-space: nowrap;
}
table.data td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td .muted { color: var(--text-3); font-size: 12.5px; }

/* ---------------- Badges / chips ---------------- */
.badge {
    display: inline-flex; align-items:center; gap:5px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge.gray   { background: var(--gray-bg);   color: var(--gray); }
.badge.blue   { background: var(--blue-bg);   color: var(--blue); }
.badge.indigo { background: var(--indigo-bg); color: var(--indigo); }
.badge.amber  { background: var(--amber-bg);  color: var(--amber); }
.badge.green  { background: var(--green-bg);  color: var(--green); }
.badge.teal   { background: var(--teal-bg);   color: var(--teal); }
.badge.red    { background: var(--red-bg);    color: var(--red); }
.dot { width: 7px; height:7px; border-radius: 50%; background: currentColor; }

.chip { display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:8px; background: var(--surface-2); border:1px solid var(--border); font-size:12.5px; color: var(--text-2); }

/* Progress */
.progress { height: 8px; background: var(--gray-bg); border-radius: 999px; overflow: hidden; min-width: 90px; }
.progress__bar { height: 100%; background: linear-gradient(90deg, var(--brand), #22d3ee); border-radius: 999px; transition: width .4s; }
.progress-label { display:flex; align-items:center; gap:8px; }
.progress-label span { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 34px; }

/* Avatars */
.avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg,#6366f1,#22d3ee); color:#fff; font-size:11.5px; font-weight:700; display:grid; place-items:center; flex:none; }
.avatar.sm { width: 24px; height:24px; font-size:10px; }
.avatar-stack { display:flex; }
.avatar-stack .avatar { margin-left: -8px; border: 2px solid var(--surface); }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ---------------- Forms ---------------- */
.form-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group.col-span-2 { grid-column: 1 / -1; }
label.form-label { display:block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
label.form-label .req { color: var(--red); }
.input, .select, .textarea {
    width: 100%; padding: 10px 12px; font-size: 14px; font-family: inherit;
    border: 1px solid var(--border-strong); border-radius: 10px;
    background: var(--surface); color: var(--text); transition: border .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,70,229,.15);
}
.textarea { min-height: 96px; resize: vertical; }
.form-hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }
.form-actions { display:flex; gap:10px; margin-top: 8px; }

/* Toggle switch */
.switch { position: relative; display:inline-block; width: 42px; height: 24px; }
.switch input { opacity:0; width:0; height:0; }
.switch .slider { position:absolute; inset:0; background: var(--border-strong); border-radius:999px; transition:.2s; cursor:pointer; }
.switch .slider::before { content:''; position:absolute; height:18px; width:18px; left:3px; top:3px; background:#fff; border-radius:50%; transition:.2s; box-shadow:0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(18px); }

/* ---------------- Flash ---------------- */
.flash-wrap { position: fixed; top: 16px; right: 16px; z-index: 100; display:flex; flex-direction:column; gap:10px; max-width: 380px; }
.flash {
    padding: 13px 16px; border-radius: 12px; box-shadow: var(--shadow-lg);
    display:flex; align-items:flex-start; gap:10px; font-size: 13.5px; font-weight: 500;
    animation: slideIn .3s ease; background:#fff; border:1px solid var(--border); color: var(--text);
}
.flash.success { border-left: 4px solid var(--green); }
.flash.error   { border-left: 4px solid var(--red); }
.flash.warning { border-left: 4px solid var(--amber); }
.flash.info    { border-left: 4px solid var(--blue); }
.flash button { margin-left:auto; background:none; border:none; cursor:pointer; color: var(--text-3); font-size:16px; line-height:1; }
@keyframes slideIn { from { transform: translateX(30px); opacity:0; } to { transform:none; opacity:1; } }

/* ---------------- Auth ---------------- */
.auth {
    min-height: 100vh; display:grid; grid-template-columns: 1fr 1fr;
}
.auth__side {
    background: linear-gradient(150deg, #312e81, #4f46e5 55%, #0ea5e9);
    color:#fff; padding: 56px; display:flex; flex-direction:column; justify-content:space-between;
    position: relative; overflow:hidden;
}
.auth__side::after { content:''; position:absolute; width:420px; height:420px; right:-120px; bottom:-140px; background:rgba(255,255,255,.08); border-radius:50%; }
.auth__brand { display:flex; align-items:center; gap:12px; font-weight:800; font-size:20px; }
.auth__brand .sidebar__logo { width:44px; height:44px; }
.auth__headline { font-size: 34px; font-weight:800; line-height:1.15; margin-bottom: 14px; }
.auth__list { list-style:none; padding:0; margin: 22px 0 0; }
.auth__list li { display:flex; gap:10px; align-items:flex-start; margin-bottom: 14px; color: rgba(255,255,255,.92); }
.auth__list .tick { background: rgba(255,255,255,.2); border-radius:8px; padding:4px; display:grid; place-items:center; }
.auth__main { display:flex; align-items:center; justify-content:center; padding: 40px; background: var(--bg); }
.auth__card { width:100%; max-width: 420px; }
.auth__card h1 { font-size: 26px; }
.auth__card .subtitle { color: var(--text-2); margin-bottom: 26px; }
.auth__demo { margin-top: 20px; padding: 13px 15px; background: var(--brand-soft); border:1px dashed #c7d2fe; border-radius: 12px; font-size: 12.5px; color: var(--brand-700); }
.auth__footer { text-align:center; margin-top: 20px; color: var(--text-2); font-size: 13.5px; }

/* ---------------- Wizard ---------------- */
.wizard-steps { display:flex; gap:8px; margin-bottom: 26px; flex-wrap:wrap; }
.wizard-step { display:flex; align-items:center; gap:10px; padding: 10px 16px; border-radius: 12px; background: var(--surface); border:1px solid var(--border); color: var(--text-3); font-weight:600; font-size:13px; }
.wizard-step.active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.wizard-step.done { color: var(--green); border-color: var(--green-bg); }
.wizard-step .num { width:24px; height:24px; border-radius:50%; background: var(--gray-bg); display:grid; place-items:center; font-size:12px; }
.wizard-step.active .num { background: var(--brand); color:#fff; }
.wizard-step.done .num { background: var(--green); color:#fff; }

.template-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap:14px; }
.template-card { border:2px solid var(--border); border-radius: 14px; padding: 18px; cursor:pointer; transition: all .15s; background: var(--surface); position:relative; }
.template-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.template-card input { position:absolute; opacity:0; }
.template-card.selected { border-color: var(--brand); background: var(--brand-soft); }
.template-card__cat { font-size:11px; text-transform:uppercase; letter-spacing:.05em; color: var(--brand); font-weight:700; }
.template-card__name { font-size: 16px; font-weight:700; margin: 6px 0; }
.template-card__desc { font-size: 12.5px; color: var(--text-2); }

/* ---------------- Misc ---------------- */
.muted { color: var(--text-3); }
.text-sm { font-size: 13px; }
.mt-0 { margin-top:0; } .mb-0 { margin-bottom:0; }
.flex { display:flex; } .items-center { align-items:center; } .gap-2 { gap:8px; } .gap-3 { gap:12px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }

.empty {
    text-align:center; padding: 46px 20px; color: var(--text-3);
}
.empty .icon { opacity:.4; margin-bottom: 10px; }
.empty h3 { color: var(--text-2); font-weight:600; }

.filter-bar { display:flex; gap:8px; flex-wrap:wrap; margin-bottom: 18px; }
.filter-pill { padding: 7px 14px; border-radius: 999px; background: var(--surface); border:1px solid var(--border); font-size: 13px; color: var(--text-2); font-weight:500; cursor:pointer; }
.filter-pill:hover { border-color: var(--brand); text-decoration:none; color: var(--brand); }
.filter-pill.active { background: var(--brand); color:#fff; border-color: var(--brand); }
.filter-pill .count { opacity:.7; margin-left:4px; }

.section-title { font-size: 13px; text-transform: uppercase; letter-spacing:.05em; color: var(--text-3); font-weight:700; margin: 26px 0 12px; }

.list-row { display:flex; align-items:center; gap:12px; padding: 12px 0; border-bottom:1px solid var(--border); }
.list-row:last-child { border-bottom:none; }
.list-row__main { flex:1; min-width:0; }
.list-row__title { font-weight:600; color: var(--text); }
.list-row__meta { font-size:12.5px; color: var(--text-3); }

.activity { position:relative; padding-left: 24px; }
.activity::before { content:''; position:absolute; left:6px; top:6px; bottom:6px; width:2px; background: var(--border); }
.activity__item { position:relative; padding: 8px 0; }
.activity__item::before { content:''; position:absolute; left:-22px; top:13px; width:9px; height:9px; border-radius:50%; background: var(--brand); border:2px solid var(--surface); }
.activity__text { font-size:13px; }
.activity__time { font-size:11.5px; color: var(--text-3); }

.kv { display:grid; grid-template-columns: 150px 1fr; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--text-2); font-weight:500; }
.kv dd { margin:0; color: var(--text); font-weight:600; }

.folder-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap:12px; }
.folder-card { display:flex; align-items:center; gap:12px; padding:14px; border:1px solid var(--border); border-radius:12px; background: var(--surface); transition: all .15s; }
.folder-card:hover { border-color: var(--brand); box-shadow: var(--shadow); text-decoration:none; }
.folder-card .icon { color: var(--amber); }
.folder-card__name { font-weight:600; font-size:13.5px; color: var(--text); }
.folder-card__count { font-size:12px; color: var(--text-3); }

.tag-inactive { opacity:.5; }

.divider { height:1px; background: var(--border); margin: 18px 0; border: none; }

.risk-meter { display:flex; gap:4px; align-items:center; }
.risk-bar { width:26px; height:8px; border-radius:3px; background: var(--gray-bg); }
.risk-bar.on { background: var(--amber); }

/* ---------------- Responsive ---------------- */
@media (max-width: 1024px) {
    .grid-main, .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .auth { grid-template-columns: 1fr; }
    .auth__side { display:none; }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    .sidebar.open { transform: none; }
    .main { margin-left: 0; }
    .topbar__toggle { display: inline-flex; }
    .content { padding: 18px; }
    .stats-grid { grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); }
    .backdrop { position: fixed; inset:0; background: rgba(15,23,42,.5); z-index:35; }
}
