/* =========================================================
   ContentOS — UI stilleri
   ========================================================= */

:root {
    --violet:        #6c47f5;
    --violet-dark:   #5a37e0;
    --violet-soft:   #f1edff;
    --violet-text:   #5b3fd6;

    --ink:           #16161c;
    --ink-2:         #3d3d48;
    --muted:         #8b8b99;
    --muted-2:       #a6a6b3;

    --bg:            #f6f6f9;
    --surface:       #ffffff;
    --surface-2:     #fafafc;
    --line:          #ececf1;
    --line-2:        #f2f2f6;

    --green:         #16a06a;
    --green-soft:    #e8f7f0;
    --blue:          #3b73e8;
    --blue-soft:     #eaf1fe;
    --amber:         #d98218;
    --amber-soft:    #fdf1e2;
    --pink:          #d24d86;
    --pink-soft:     #fdeef4;

    --r-sm:  8px;
    --r-md:  10px;
    --r-lg:  14px;
    --r-xl:  18px;

    --shadow-sm: 0 1px 2px rgba(20, 20, 40, .05);
    --shadow-md: 0 4px 14px rgba(20, 20, 40, .06);
    --shadow-lg: 0 18px 40px rgba(18, 18, 40, .16);

    --sidebar-w: 272px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.icon { flex: none; }

/* ---------- Iskelet ---------- */

.app { display: flex; min-height: 100vh; }

.app__main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.content {
    flex: 1;
    padding: 26px 34px 90px;
    max-width: 1420px;
    width: 100%;
}

/* ---------- Sidebar ---------- */

.sidebar {
    width: var(--sidebar-w);
    flex: none;
    background: var(--surface);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    padding: 22px 16px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    transition: margin-left .24s ease;
}

/* Masaustunde daraltilmis durum */
.sidebar-closed .sidebar { margin-left: calc(-1 * var(--sidebar-w)); }

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 8px 26px;
}

.brand__mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(150deg, #7b5cff, var(--violet));
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 17px;
    box-shadow: 0 4px 12px rgba(108, 71, 245, .32);
}

.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-size: 16.5px; font-weight: 700; letter-spacing: -.2px; }
.brand__text small {
    font-size: 9px;
    letter-spacing: .13em;
    color: var(--muted-2);
    font-weight: 500;
    margin-top: 3px;
}

.nav { flex: 1; }

.nav__group {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted-2);
    padding: 0 10px;
    margin: 18px 0 8px;
}
.nav__group:first-child { margin-top: 0; }

.nav__list { display: flex; flex-direction: column; gap: 2px; }

.nav__link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    border-radius: var(--r-md);
    color: #45454f;
    font-size: 14px;
    font-weight: 500;
    transition: background .15s, color .15s;
}

.nav__link:hover { background: var(--surface-2); color: var(--ink); }

.nav__link.is-active {
    background: var(--violet-soft);
    color: var(--violet-text);
    font-weight: 600;
}

.nav__icon { display: grid; place-items: center; color: var(--muted); }
.nav__link.is-active .nav__icon { color: var(--violet); }
.nav__link:hover .nav__icon { color: var(--ink-2); }

.nav__label { flex: 1; }

.nav__badge {
    min-width: 21px;
    height: 21px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--line-2);
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
    display: grid;
    place-items: center;
}
.nav__link.is-active .nav__badge { background: #fff; color: var(--violet-text); }

/* Upsell kutusu */

.upsell {
    margin: 20px 4px 14px;
    padding: 16px;
    border-radius: var(--r-lg);
    background: linear-gradient(170deg, #f6f3ff, #f4f6ff);
    border: 1px solid #eae4ff;
}

.upsell__icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--violet);
    color: #fff;
    display: grid;
    place-items: center;
    margin-bottom: 11px;
    box-shadow: 0 4px 10px rgba(108, 71, 245, .3);
}

.upsell strong { display: block; font-size: 13.5px; margin-bottom: 4px; }
.upsell p { color: var(--muted); font-size: 12.5px; margin-bottom: 12px; }

/* Hesap */

.account {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 8px 4px;
    border-top: 1px solid var(--line);
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #1c1c24;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 600;
    flex: none;
}

.account__text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.account__text strong { font-size: 13px; font-weight: 600; }
.account__text small { font-size: 11.5px; color: var(--muted); }

.sidebar-backdrop { display: none; }

/* ---------- Topbar ---------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 34px;
    background: rgba(246, 246, 249, .86);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.topbar__burger { display: grid; flex: none; }

.search {
    position: relative;
    flex: 1;
    max-width: 460px;
}

.search__icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-2);
    display: grid;
}

.search input {
    width: 100%;
    height: 42px;
    padding: 0 62px 0 39px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    font-size: 13.5px;
    color: var(--ink);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--muted-2); }
.search input:focus {
    border-color: #cfc2fb;
    box-shadow: 0 0 0 3px rgba(108, 71, 245, .1);
}

.search__kbd {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    padding: 3px 7px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-2);
    color: var(--muted-2);
    font-size: 10.5px;
    font-family: inherit;
}

.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ---------- Butonlar ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: var(--r-md);
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .15s, border-color .15s, transform .08s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn--block { width: 100%; }

.btn--primary {
    background: var(--violet);
    color: #fff;
    box-shadow: 0 4px 12px rgba(108, 71, 245, .28);
}
.btn--primary:hover { background: var(--violet-dark); }

.btn--outline {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}
.btn--outline:hover { border-color: #dcdce4; }

.btn--soft {
    height: 38px;
    background: var(--surface-2);
    border-color: var(--line);
    color: #2c2c36;
    font-weight: 500;
}
.btn--soft:hover { background: #f3f3f7; border-color: #e2e2ea; }

.btn--ghost {
    height: 36px;
    background: var(--surface);
    border-color: #e6e0fb;
    color: var(--violet-text);
    font-size: 13px;
}
.btn--ghost:hover { background: #fbfaff; }

.btn--light {
    height: 38px;
    background: #fff;
    color: var(--ink);
}
.btn--light:hover { background: #f1f1f5; }

.icon-btn {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    color: #52525e;
    box-shadow: var(--shadow-sm);
    transition: border-color .15s, background .15s;
}
.icon-btn:hover { border-color: #dcdce4; background: var(--surface-2); }

.icon-btn--plain { width: 28px; height: 28px; border: 0; background: none; box-shadow: none; color: var(--muted-2); }
.icon-btn--plain:hover { background: var(--surface-2); color: var(--ink); }

.icon-btn--square { width: 38px; height: 38px; flex: none; color: var(--muted); }

.icon-btn--dot { position: relative; }
.icon-btn--dot::after {
    content: '';
    position: absolute;
    top: 9px; right: 10px;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--violet);
    border: 2px solid var(--surface);
}

/* ---------- Sayfa basligi ---------- */

.page-head { margin-bottom: 26px; }

.eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .11em;
    color: var(--muted-2);
    margin-bottom: 12px;
}

.page-head__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -.7px;
    line-height: 1.2;
}
.wave { display: inline-block; }

.page-sub { color: var(--muted); font-size: 14px; margin-top: 9px; }
.page-sub strong { color: var(--violet-text); font-weight: 600; }

/* ---------- Istatistik kartlari ---------- */

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.stat {
    display: flex;
    gap: 13px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}

.stat__icon {
    width: 38px;
    height: 38px;
    border-radius: var(--r-md);
    display: grid;
    place-items: center;
    flex: none;
}
.stat__icon--violet { background: var(--violet-soft); color: var(--violet); }
.stat__icon--blue   { background: var(--blue-soft);   color: var(--blue); }
.stat__icon--amber  { background: var(--amber-soft);  color: var(--amber); }
.stat__icon--green  { background: var(--green-soft);  color: var(--green); }

.stat__body { min-width: 0; }

.stat__label {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--muted-2);
}

.stat__value {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -.6px;
    line-height: 1.25;
    margin: 5px 0 4px;
}
.stat__suffix { font-size: 13px; font-weight: 500; color: var(--muted-2); letter-spacing: 0; }

.stat__meta { font-size: 11.5px; color: var(--muted); }
.stat__meta strong { color: var(--ink-2); font-weight: 600; }
.trend-up { color: var(--green); font-weight: 600; }

/* ---------- Panel ---------- */

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--line-2);
    flex-wrap: wrap;
}

.panel__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -.3px;
}

.panel__sub { color: var(--muted); font-size: 13px; margin-top: 6px; }

.panel--empty {
    padding: 60px 30px;
    text-align: center;
}
.panel--empty h2 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.panel--empty p { color: var(--muted); max-width: 420px; margin: 0 auto 18px; }

.empty__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--violet-soft);
    color: var(--violet);
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
}

/* Segmented filtre */

.segmented {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}

.segmented__item {
    height: 30px;
    padding: 0 14px;
    border: 0;
    border-radius: 7px;
    background: none;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    transition: background .15s, color .15s;
}
.segmented__item:hover { color: var(--ink); }
.segmented__item.is-active {
    background: var(--surface);
    color: var(--ink);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* Etiket pill */

.pill {
    display: inline-flex;
    align-items: center;
    height: 23px;
    padding: 0 9px;
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: -.1px;
}
.pill--violet { background: var(--violet-soft); color: var(--violet-text); }
.pill--blue   { background: var(--blue-soft);   color: var(--blue); }
.pill--green  { background: var(--green-soft);  color: var(--green); }
.pill--amber  { background: var(--amber-soft);  color: var(--amber); }
.pill--pink   { background: var(--pink-soft);   color: var(--pink); }

/* ---------- Fikir kartlari ---------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding: 24px;
}

.idea {
    display: flex;
    flex-direction: column;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    transition: border-color .16s, box-shadow .16s, transform .16s;
}
.idea:hover {
    border-color: #dedee7;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.idea.is-selected {
    border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(108, 71, 245, .1);
}

.idea__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.tick {
    width: 21px;
    height: 21px;
    border: 1.5px solid #dcdce6;
    border-radius: 6px;
    background: var(--surface);
    display: grid;
    place-items: center;
    color: transparent;
    flex: none;
    transition: background .14s, border-color .14s, color .14s;
}
.tick:hover { border-color: var(--violet); }
.tick.is-checked {
    background: var(--violet);
    border-color: var(--violet);
    color: #fff;
}

.idea__title {
    font-size: 15.5px;
    font-weight: 500;
    letter-spacing: -.2px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.idea__quote {
    font-size: 13.5px;
    color: #55555f;
    line-height: 1.5;
    margin-bottom: 10px;
}

.idea__excerpt {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.55;
    margin-bottom: 18px;
}

.idea__foot { margin-top: auto; }

.idea__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--line-2);
    margin-bottom: 12px;
}

.idea__format {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--muted);
}

.idea__score {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--green);
}

.idea__actions { display: flex; gap: 8px; }

.empty {
    padding: 0 24px 28px;
    color: var(--muted);
    text-align: center;
}

/* ---------- Secim cubugu ---------- */

.selection-bar {
    position: fixed;
    left: calc(50% + var(--sidebar-w) / 2);
    bottom: 26px;
    transform: translateX(-50%);
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 10px 10px 14px;
    background: #17171d;
    color: #fff;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    animation: bar-in .22s ease;
}
.selection-bar[hidden] { display: none; }
.sidebar-closed .selection-bar { left: 50%; }

@keyframes bar-in {
    from { opacity: 0; transform: translate(-50%, 12px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

.selection-bar__count {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--violet);
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 600;
    flex: none;
}

.selection-bar__text { display: flex; flex-direction: column; line-height: 1.3; }
.selection-bar__text strong { font-size: 13px; font-weight: 600; }
.selection-bar__text small { font-size: 11.5px; color: #a5a5b4; }

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    /* Mobilde sidebar ustte kayan panel; margin degil transform kullanilir. */
    .sidebar {
        position: fixed;
        z-index: 60;
        left: 0; top: 0;
        margin-left: 0;
        transform: none;
        transition: transform .22s ease;
        box-shadow: var(--shadow-lg);
    }
    .sidebar-closed .sidebar { margin-left: 0; transform: translateX(-100%); }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 50;
        background: rgba(16, 16, 26, .38);
        opacity: 1;
        pointer-events: auto;
        transition: opacity .2s;
    }
    .sidebar-closed .sidebar-backdrop { opacity: 0; pointer-events: none; }

    .topbar { padding: 12px 18px; }
    .content { padding: 20px 18px 96px; }

    .selection-bar { left: 50%; right: auto; width: calc(100% - 32px); max-width: 460px; }
}

@media (max-width: 620px) {
    .stats { grid-template-columns: 1fr; }
    .card-grid { grid-template-columns: 1fr; padding: 18px; }
    .page-title { font-size: 24px; }
    .search__kbd { display: none; }
    .panel__head { padding: 18px; }
    .segmented { width: 100%; overflow-x: auto; }
}

/* =========================================================
   Giris / kayit ekranlari
   ========================================================= */

.auth-body { background: var(--surface); }

.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.auth__panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 8vw;
    max-width: 620px;
    width: 100%;
    margin-left: auto;
}

.brand--auth { padding: 0 0 40px; }

.auth__title {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -.6px;
}

.auth__sub {
    color: var(--muted);
    margin: 8px 0 26px;
}

.auth__foot {
    margin-top: 22px;
    font-size: 13.5px;
    color: var(--muted);
}
.auth__foot a { color: var(--violet-text); font-weight: 600; }
.auth__foot a:hover { text-decoration: underline; }

/* Sag taraftaki tanitim alani */

.auth__aside {
    background: linear-gradient(160deg, #f6f3ff, #eef1ff 60%, #f7f6ff);
    border-left: 1px solid var(--line);
    padding: 48px 6vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 26px;
}

.auth__quote {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -.4px;
    line-height: 1.45;
    max-width: 420px;
}

.auth__list {
    display: flex;
    flex-direction: column;
    gap: 13px;
    color: #4a4a57;
    font-size: 14px;
}
.auth__list li { display: flex; align-items: center; gap: 10px; }
.auth__list .icon { color: var(--violet); }

/* ---------- Form ogeleri ---------- */

.form { display: flex; flex-direction: column; gap: 16px; }

/* min-width: 0 sart: grid/flex ogeleri varsayilan olarak icerigin dogal
   genisligini dayatir ve input sutundan tasar. */
.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field__label {
    font-size: 13px;
    font-weight: 600;
    color: #3a3a45;
}

.field__input {
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--surface);
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.field__input::placeholder { color: var(--muted-2); }
.field__input:focus {
    border-color: #cfc2fb;
    box-shadow: 0 0 0 3px rgba(108, 71, 245, .1);
}
.field__input.has-error { border-color: #e0788f; }
.field__input.has-error:focus { box-shadow: 0 0 0 3px rgba(210, 77, 134, .12); }

.field__error {
    font-size: 12.5px;
    color: #c93f6b;
}

.btn--lg { height: 46px; font-size: 14.5px; }

.alert {
    padding: 12px 14px;
    border-radius: var(--r-md);
    font-size: 13.5px;
    margin-bottom: 18px;
}
.alert--error {
    background: var(--pink-soft);
    border: 1px solid #f7d6e3;
    color: #b23a63;
}

@media (max-width: 900px) {
    .auth { grid-template-columns: 1fr; }
    .auth__aside { display: none; }
    .auth__panel { margin: 0 auto; padding: 40px 24px; }
}

@media (max-width: 520px) {
    .field-row { grid-template-columns: 1fr; }
}
