/* =========================================================================
   VM Planner — tasarım sistemi
   Elle yazılmış tek stil dosyası. Derleme adımı yoktur: bu dosya tarayıcıya
   olduğu gibi gider, değiştirdiğinde FTP ile yüklemen yeterlidir.

   Token değerleri design_handoff_vm_planner/tokens/*.css dosyalarından
   birebir aktarılmıştır.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Token'lar
   ------------------------------------------------------------------------- */
:root {
    /* Marka renkleri (Illustrator dışa aktarımından) */
    --violet-600: #6127ff;
    --ink-900: #151423;
    --plum-700: #474072;
    --lavender-300: #b4b4d5;
    --mist-50: #f5f5f9;
    --rose-500: #ff2e61;
    --cyan-500: #02ceff;
    --green-500: #00bd70;
    --yellow-500: #ffcb00;
    --orange-500: #ff5919;

    /* Anlamsal renkler */
    --surface: #ffffff;
    --page: var(--mist-50);
    --ink: var(--ink-900);
    --ink-soft: var(--plum-700);
    --ink-muted: color-mix(in srgb, var(--ink-900) 45%, white);
    --line: color-mix(in srgb, var(--lavender-300) 45%, white);
    --line-strong: color-mix(in srgb, var(--lavender-300) 75%, white);

    --accent: var(--violet-600);
    --accent-hover: color-mix(in srgb, var(--violet-600) 88%, black);
    --accent-active: color-mix(in srgb, var(--violet-600) 76%, black);
    --accent-soft: color-mix(in srgb, var(--violet-600) 9%, white);
    --focus-ring: color-mix(in srgb, var(--violet-600) 45%, transparent);

    --danger: var(--rose-500);
    --danger-soft: color-mix(in srgb, var(--rose-500) 10%, white);
    --success: var(--green-500);
    --success-soft: color-mix(in srgb, var(--green-500) 10%, white);

    /* Yazı */
    --font-sans: 'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --fs-xs: 12px;
    --fs-sm: 13px;
    --fs-base: 15px;
    --fs-md: 16px;
    --fs-lg: 18px;
    --fs-xl: 22px;
    --fs-2xl: 28px;
    --fs-3xl: 36px;

    /* Köşe yarıçapı */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 999px;

    /* Gölge — çok yumuşak, seyrek kullanılır */
    --shadow-sm: 0 1px 2px rgba(21, 20, 35, 0.06);
    --shadow-md: 0 4px 12px rgba(21, 20, 35, 0.08);
    --shadow-lg: 0 12px 32px rgba(21, 20, 35, 0.12);

    /* Hareket */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --dur-fast: 120ms;
    --dur: 200ms;

    /* Ölçüler */
    --sidebar-w: 232px;
    --sidebar-w-collapsed: 72px;
}

/* Kategori renkleri: hedef/proje etiketleri ve grafikler için.
   Sayfa kromunda (menü, buton, kenarlık) asla kullanılmaz.

   Tek bir .cat-* sınıfı iki değişkeni birden kurar; bileşenler bunları
   okur. Böylece "bg-cat-rose-soft" gibi onlarca sınıf üretmeye gerek
   kalmadan renk, Blade tarafında dinamik olarak verilebilir. */
.cat-violet { --cat: var(--violet-600); --cat-soft: color-mix(in srgb, var(--violet-600) 9%, white); }
.cat-rose   { --cat: var(--rose-500);   --cat-soft: color-mix(in srgb, var(--rose-500) 12%, white); }
.cat-cyan   { --cat: var(--cyan-500);   --cat-soft: color-mix(in srgb, var(--cyan-500) 14%, white); }
.cat-green  { --cat: var(--green-500);  --cat-soft: color-mix(in srgb, var(--green-500) 12%, white); }
.cat-yellow { --cat: var(--yellow-500); --cat-soft: color-mix(in srgb, var(--yellow-500) 16%, white); }
.cat-orange { --cat: var(--orange-500); --cat-soft: color-mix(in srgb, var(--orange-500) 12%, white); }

/* -------------------------------------------------------------------------
   2. Temel sıfırlama
   ------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    background-color: var(--page);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: 1.5;
}

img,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: none;
    padding: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3, h4 {
    font-size: inherit;
    font-weight: inherit;
    line-height: 1.2;
}

ul, ol {
    list-style: none;
    padding: 0;
}

table {
    border-collapse: collapse;
    width: 100%;
}

/* Odak halkası: klavyeyle gezinirken arayüzün her yerinde aynı görünür. */
:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

/* Tarayıcının otomatik doldurma sarısı, giriş formunun beyaz yüzeyini bozuyordu. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 40px var(--surface) inset;
    -webkit-text-fill-color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* -------------------------------------------------------------------------
   3. Uygulama kabuğu ve sol menü
   ------------------------------------------------------------------------- */
.vm-shell {
    display: flex;
    min-height: 100vh;
}

/* Mobil çekmece açıkken arkadaki karartma. Tasarım sistemindeki tek
   saydamlık kullanımı bu ve modal perdesidir. */
.vm-scrim {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(21, 20, 35, 0.4);
}

.vm-sidebar {
    position: fixed;
    inset-block: 0;
    left: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: var(--sidebar-w);
    padding: 18px 12px;
    background: var(--surface);
    border-right: 1px solid var(--line);
    transform: translateX(-100%);
    transition: transform var(--dur) var(--ease), width var(--dur) var(--ease);
}

.vm-sidebar.is-open {
    transform: translateX(0);
}

.vm-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 6px 20px;
}

/* Marka kilidi. Kaynak dosya mor (#6127FF) ve saydam zeminli olduğu için
   beyaz yüzeylerde olduğu gibi kullanılır. */
.vm-logo {
    display: block;
    width: auto;
}

.vm-logo-sidebar { height: 25px; }
.vm-logo-topbar { height: 22px; }
.vm-logo-login { height: 38px; }

.vm-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vm-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    font-size: 14.5px;
    color: var(--ink-soft);
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.vm-nav-item:hover {
    background: var(--page);
}

.vm-nav-item i {
    width: 18px;
    flex-shrink: 0;
    text-align: center;
    font-size: 15px;
}

.vm-nav-item-active,
.vm-nav-item-active:hover {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.vm-nav-spacer {
    flex: 1;
}

/* Masaüstü: menü sabit sütun, daraltma durumu <html> sınıfıyla sürülür.
   Böylece tercih, Alpine yüklenmeden <head>'deki küçük betikle uygulanır
   ve sayfa her açılışta menü genişliği bir an zıplamaz. */
@media (min-width: 768px) {
    .vm-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        transform: none;
    }

    html.sidebar-collapsed .vm-sidebar {
        width: var(--sidebar-w-collapsed);
    }

    html.sidebar-collapsed .vm-sidebar-label {
        display: none;
    }

    html.sidebar-collapsed .vm-sidebar-head {
        justify-content: center;
    }

    html.sidebar-collapsed .vm-nav-item {
        justify-content: center;
        padding-inline: 0;
    }
}

.vm-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

/* Mobil üst çubuk: masaüstünde menü zaten görünür olduğu için gizlenir. */
.vm-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

@media (min-width: 768px) {
    .vm-topbar,
    .vm-scrim {
        display: none;
    }
}

/* -------------------------------------------------------------------------
   4. Sayfa iskeleti
   ------------------------------------------------------------------------- */
.vm-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px 20px;
}

@media (min-width: 768px) {
    .vm-page {
        padding: 28px 36px;
    }
}

.vm-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
}

.vm-page-title {
    font-size: var(--fs-2xl);
    font-weight: 800;
    line-height: 1.2;
    color: var(--ink);
}

.vm-page-subtitle {
    margin-top: 2px;
    font-size: 14px;
    color: var(--ink-muted);
}

.vm-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.vm-section-title {
    font-size: var(--fs-md);
    font-weight: 700;
    color: var(--ink);
}

/* -------------------------------------------------------------------------
   5. Kart
   ------------------------------------------------------------------------- */
.vm-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.vm-card-pad {
    padding: 20px;
}

.vm-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}

/* -------------------------------------------------------------------------
   6. Izgaralar
   ------------------------------------------------------------------------- */
.vm-grid-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.vm-grid-cards {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

/* Tasarımdaki 1.6fr / 1fr ikili satır. */
.vm-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

@media (min-width: 640px) {
    .vm-grid-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .vm-grid-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .vm-grid-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .vm-split {
        grid-template-columns: 1.6fr minmax(0, 1fr);
    }

    .vm-split-even {
        grid-template-columns: 1.4fr minmax(0, 1fr);
    }
}

/* -------------------------------------------------------------------------
   7. Butonlar
   ------------------------------------------------------------------------- */
.vm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: filter var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease),
        color var(--dur-fast) var(--ease);
}

.vm-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.vm-btn-primary {
    background: var(--accent);
    color: #fff;
}

.vm-btn-primary:hover:not(:disabled) {
    filter: brightness(0.94);
}

.vm-btn-primary:active:not(:disabled) {
    background: var(--accent-active);
}

.vm-btn-ghost {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    color: var(--ink-soft);
}

.vm-btn-ghost:hover:not(:disabled) {
    background: var(--page);
}

.vm-btn-danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.vm-btn-danger:hover:not(:disabled) {
    filter: brightness(0.97);
}

.vm-btn-sm {
    padding: 7px 12px;
    font-size: var(--fs-xs);
}

.vm-btn-block {
    width: 100%;
}

/* Simge butonu: menü daraltma, satır içi düzenle/sil eylemleri */
.vm-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    color: var(--ink-muted);
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.vm-icon-btn:hover {
    background: var(--page);
    color: var(--ink);
}

.vm-icon-btn-danger:hover {
    background: var(--danger-soft);
    color: var(--danger);
}

/* -------------------------------------------------------------------------
   8. Form alanları
   ------------------------------------------------------------------------- */
.vm-label {
    display: block;
    margin-bottom: 6px;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--ink-soft);
}

.vm-input,
.vm-select,
.vm-textarea {
    display: block;
    width: 100%;
    padding: 11px 14px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    font-size: var(--fs-base);
    color: var(--ink);
    transition: border-color var(--dur-fast) var(--ease);
}

.vm-input::placeholder,
.vm-textarea::placeholder {
    color: var(--ink-muted);
}

.vm-input:focus,
.vm-select:focus,
.vm-textarea:focus {
    border-color: var(--accent);
    outline: none;
}

.vm-textarea {
    min-height: 84px;
    resize: vertical;
}

.vm-select {
    appearance: none;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23474072'%3E%3Cpath d='M4.2 6.2a.7.7 0 0 1 1 0L8 9l2.8-2.8a.7.7 0 1 1 1 1L8.5 10.5a.7.7 0 0 1-1 0L4.2 7.2a.7.7 0 0 1 0-1Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    cursor: pointer;
}

/* Alan içi ikonla birlikte kullanılan sarmalayıcı (giriş formu) */
.vm-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    transition: border-color var(--dur-fast) var(--ease);
}

.vm-field:focus-within {
    border-color: var(--accent);
}

.vm-field > i {
    font-size: var(--fs-sm);
    color: var(--ink-muted);
}

.vm-field input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    outline: none;
    font-size: var(--fs-base);
    color: var(--ink);
}

.vm-field input::placeholder {
    color: var(--ink-muted);
}

.vm-error {
    display: block;
    margin-top: 6px;
    font-size: var(--fs-sm);
    color: var(--danger);
}

.vm-hint {
    display: block;
    margin-top: 6px;
    font-size: var(--fs-xs);
    color: var(--ink-muted);
}

.vm-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

@media (min-width: 560px) {
    .vm-form-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.vm-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--fs-sm);
    color: var(--ink-soft);
    cursor: pointer;
}

.vm-check input[type='checkbox'] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* -------------------------------------------------------------------------
   9. Rozet, hap, çip, ilerleme çubuğu
   ------------------------------------------------------------------------- */
.vm-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
}

.vm-pill-accent  { background: var(--accent-soft); color: var(--accent); }
.vm-pill-success { background: var(--success-soft); color: var(--success); }
.vm-pill-danger  { background: var(--danger-soft); color: var(--danger); }
.vm-pill-muted   { background: var(--page); color: var(--ink-muted); }
.vm-pill-cat     { background: var(--cat-soft); color: var(--cat); }

/* İkon çipi: istatistik ve hedef kartlarındaki renkli kare */
.vm-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    background: var(--cat-soft);
    color: var(--cat);
}

.vm-chip-lg {
    width: 40px;
    height: 40px;
    font-size: var(--fs-md);
}

.vm-chip-plain {
    background: var(--page);
    color: var(--ink-muted);
}

.vm-progress {
    width: 100%;
    height: 8px;
    overflow: hidden;
    background: var(--page);
    border-radius: var(--radius-full);
}

.vm-progress-sm { height: 7px; }

.vm-progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--cat, var(--accent));
    transition: width var(--dur) var(--ease);
}

/* -------------------------------------------------------------------------
   10. İstatistik kartı
   ------------------------------------------------------------------------- */
.vm-stat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
}

.vm-stat-value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    color: var(--ink);
}

.vm-stat-foot {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: var(--fs-sm);
}

.vm-stat-label {
    min-width: 0;
    color: var(--ink-soft);
}

.vm-delta {
    flex-shrink: 0;
    font-weight: 600;
}

.vm-delta-success { color: var(--success); }
.vm-delta-danger  { color: var(--danger); }
.vm-delta-muted   { color: var(--ink-muted); }

/* -------------------------------------------------------------------------
   11. Sekmeler (Günlük / Haftalık / Aylık)
   ------------------------------------------------------------------------- */
.vm-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    scrollbar-width: none;
}

.vm-tabs::-webkit-scrollbar {
    display: none;
}

.vm-tab {
    position: relative;
    padding: 10px 14px;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--ink-muted);
    white-space: nowrap;
    cursor: pointer;
    transition: color var(--dur-fast) var(--ease);
}

.vm-tab:hover {
    color: var(--ink-soft);
}

.vm-tab-active,
.vm-tab-active:hover {
    color: var(--accent);
}

.vm-tab-active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--accent);
    border-radius: var(--radius-full);
}

/* -------------------------------------------------------------------------
   12. Görev listesi (günlük plan takibi)
   ------------------------------------------------------------------------- */
.vm-task {
    display: flex;
    /* Not açıldığında kutu ve saat satırın ortasına kaymasın, başlık
       hizasında kalsınlar. */
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.vm-task:last-child {
    border-bottom: none;
}

.vm-task-box {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
    accent-color: var(--accent);
    cursor: pointer;
}

.vm-task-body {
    flex: 1;
    min-width: 0;
}

.vm-task-title {
    font-size: 14.5px;
    color: var(--ink);
    overflow-wrap: anywhere;
    transition: opacity var(--dur-fast) var(--ease);
}

.vm-task-done .vm-task-title {
    text-decoration: line-through;
    opacity: 0.55;
}

/* Başlığın altındaki proje / hedef / not satırı */
.vm-task-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 12px;
    margin-top: 4px;
    font-size: var(--fs-xs);
    color: var(--ink-muted);
}

.vm-task-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    max-width: 100%;
}

.vm-task-note-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    color: var(--ink-muted);
    cursor: pointer;
    transition: color var(--dur-fast) var(--ease);
}

.vm-task-note-btn:hover {
    color: var(--accent);
}

/* Açılan not gövdesi. Satır sonları korunur (white-space: pre-line). */
.vm-task-note {
    margin-top: 8px;
    padding: 9px 11px;
    background: var(--page);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    line-height: 1.45;
    color: var(--ink-soft);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.vm-task-time {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: var(--fs-sm);
    font-variant-numeric: tabular-nums;
    color: var(--ink-muted);
}

.vm-task-actions {
    display: flex;
    flex-shrink: 0;
    gap: 2px;
    opacity: 0;
    transition: opacity var(--dur-fast) var(--ease);
}

.vm-task:hover .vm-task-actions,
.vm-task:focus-within .vm-task-actions {
    opacity: 1;
}

/* Dokunmatik cihazda hover yok — eylemler her zaman görünür. */
@media (hover: none) {
    .vm-task-actions {
        opacity: 1;
    }
}

/* -------------------------------------------------------------------------
   13. Planlama görünümleri
   ------------------------------------------------------------------------- */
/* Günlük: saat sütunu + olay hapı */
.vm-hour {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
}

.vm-hour:last-child {
    border-bottom: none;
}

.vm-hour-label {
    width: 52px;
    flex-shrink: 0;
    padding-top: 5px;
    font-size: var(--fs-xs);
    font-variant-numeric: tabular-nums;
    color: var(--ink-muted);
}

.vm-hour-slot {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Olay hapı: solda tamamlandı kutusu, sağda başlık.
   Kutuya tıklamak görevi tamamlar, yazıya tıklamak düzenleme açar. */
.vm-event {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 7px 12px;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
}

.vm-event-box {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--accent);
    cursor: pointer;
}

.vm-event-body {
    flex: 1;
    min-width: 0;
}

.vm-event-text {
    display: block;
    width: 100%;
    min-width: 0;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--accent);
    text-align: left;
    cursor: pointer;
    overflow-wrap: anywhere;
    transition: opacity var(--dur-fast) var(--ease);
}

.vm-event-done .vm-event-text {
    text-decoration: line-through;
    opacity: 0.55;
}

.vm-event-empty {
    padding: 7px 0;
    font-size: var(--fs-sm);
    color: var(--line-strong);
}

/* Haftalık: mobilde tek sütun, masaüstünde 7 gün yan yana.

   Sütunlara 150px alt sınır konur ve taşma yatay kaydırmaya bırakılır;
   sabit 7 sütunda dar ekranlarda her sütun ~65px'e düşüyor ve görev
   başlıkları harf harf kırılıyordu. */
.vm-week-scroll {
    overflow-x: auto;
}

.vm-week {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

@media (min-width: 768px) {
    .vm-week {
        grid-template-columns: none;
        grid-auto-flow: column;
        /* 165px: tamamlandı kutusu ~21px yer kaplıyor, başlığa yer kalsın. */
        grid-auto-columns: minmax(165px, 1fr);
    }
}

.vm-week-day {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

@media (min-width: 768px) {
    .vm-week-day {
        min-height: 140px;
    }
}

.vm-week-day-today {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.vm-week-day-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    font-size: var(--fs-xs);
    color: var(--ink-muted);
}

.vm-week-day-head b {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--ink);
}

.vm-chip-task {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 6px 8px;
    background: var(--page);
    border-radius: var(--radius-sm);
}

.vm-chip-box {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 1px;
    accent-color: var(--accent);
    cursor: pointer;
}

.vm-chip-text {
    flex: 1;
    min-width: 0;
    font-size: var(--fs-xs);
    line-height: 1.35;
    color: var(--ink-soft);
    text-align: left;
    cursor: pointer;
    overflow-wrap: break-word;
    transition: opacity var(--dur-fast) var(--ease);
}

/* Saat kendi satırında dursun; başlıkla yan yana akınca dar sütunda
   ikisi birbirine giriyor. */
.vm-chip-text b {
    display: block;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.vm-chip-task-done .vm-chip-text {
    text-decoration: line-through;
    opacity: 0.55;
}

/* Aylık: 7 sütunlu takvim */
.vm-month {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.vm-month-head {
    padding: 4px 0;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--ink-muted);
    text-align: center;
}

.vm-month-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    aspect-ratio: 1;
    padding: 8px 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.vm-month-cell:hover {
    background: var(--page);
}

.vm-month-cell-muted {
    color: var(--ink-muted);
    opacity: 0.45;
}

.vm-month-cell-today {
    border-color: var(--accent);
    font-weight: 700;
    color: var(--accent);
}

.vm-month-cell-selected {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.vm-month-dot {
    width: 5px;
    height: 5px;
    border-radius: var(--radius-full);
    background: var(--accent);
}

/* -------------------------------------------------------------------------
   14. Tablo (projeler)
   ------------------------------------------------------------------------- */
.vm-table-wrap {
    overflow-x: auto;
}

.vm-table {
    /* Sütunların sıkışıp metni kırmasındansa tablo yatay kaysın. */
    min-width: 880px;
}

.vm-table th {
    padding: 12px 20px;
    border-bottom: 1px solid var(--line);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-muted);
    text-align: left;
    white-space: nowrap;
}

.vm-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    font-size: var(--fs-sm);
    color: var(--ink-soft);
    vertical-align: middle;
}

.vm-table tbody tr:last-child td {
    border-bottom: none;
}

.vm-table tbody tr:hover td {
    background: color-mix(in srgb, var(--page) 60%, white);
}

.vm-table-name {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
}

/* Tarih ve tutar hücreleri tek satırda kalsın. */
.vm-td-nowrap {
    white-space: nowrap;
}

.vm-table-sub {
    margin-top: 2px;
    font-size: var(--fs-xs);
    color: var(--ink-muted);
}

.vm-num {
    font-variant-numeric: tabular-nums;
}

.vm-td-actions {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

/* -------------------------------------------------------------------------
   15. Hedef kartı
   ------------------------------------------------------------------------- */
.vm-goal {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
}

.vm-goal-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vm-goal-title {
    flex: 1;
    min-width: 0;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.vm-goal-foot {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: 12.5px;
    color: var(--ink-muted);
}

/* Panel'deki kompakt hedef satırı */
.vm-goal-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.vm-goal-row:last-child {
    border-bottom: none;
}

.vm-goal-row-body {
    flex: 1;
    min-width: 0;
}

.vm-goal-row-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
    font-size: var(--fs-sm);
}

/* -------------------------------------------------------------------------
   16. İstatistik grafiği (haftalık sütun)
   ------------------------------------------------------------------------- */
.vm-bars {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 190px;
    padding-top: 8px;
}

.vm-bar-col {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: 100%;
    min-width: 0;
}

.vm-bar-track {
    position: relative;
    display: flex;
    align-items: flex-end;
    width: 100%;
    /* Az sayıda sütunda tam genişlik blok gibi duruyordu. */
    max-width: 56px;
    flex: 1;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.vm-bar-fill {
    width: 100%;
    background: var(--accent);
    border-radius: var(--radius-sm);
    transition: height var(--dur) var(--ease);
}

.vm-bar-label {
    font-size: var(--fs-xs);
    color: var(--ink-muted);
    white-space: nowrap;
}

.vm-bar-value {
    font-size: var(--fs-xs);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ink-soft);
}

/* Kategori dağılımı listesi */
.vm-legend {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    font-size: var(--fs-sm);
}

.vm-legend:last-child {
    border-bottom: none;
}

.vm-legend-dot {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    border-radius: var(--radius-full);
    background: var(--cat, var(--accent));
}

.vm-legend-label {
    flex: 1;
    min-width: 0;
    color: var(--ink-soft);
}

.vm-legend-value {
    flex-shrink: 0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

/* -------------------------------------------------------------------------
   17. Modal
   ------------------------------------------------------------------------- */
/* Modal açıkken arka plan kaymasın. Bu sınıfı modalin kendisi değil,
   layout'taki gözlemci yönetir (bkz. layouts/app.blade.php). */
body.vm-scroll-lock {
    overflow: hidden;
}

.vm-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    overflow-y: auto;
    padding: 24px 16px;
    background: rgba(21, 20, 35, 0.4);
}

.vm-modal-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

.vm-modal-panel {
    width: 100%;
    max-width: 520px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.vm-modal-panel-sm { max-width: 400px; }
.vm-modal-panel-lg { max-width: 680px; }

.vm-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--line);
}

.vm-modal-title {
    font-size: var(--fs-md);
    font-weight: 700;
    color: var(--ink);
}

.vm-modal-body {
    padding: 20px 24px;
}

.vm-modal-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--line);
}

/* -------------------------------------------------------------------------
   18. Boş durum
   ------------------------------------------------------------------------- */
.vm-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 48px 20px;
    text-align: center;
}

.vm-empty-title {
    font-size: var(--fs-base);
    font-weight: 600;
    color: var(--ink);
}

.vm-empty-text {
    max-width: 340px;
    font-size: var(--fs-sm);
    color: var(--ink-muted);
}

/* -------------------------------------------------------------------------
   19. Giriş ekranı
   ------------------------------------------------------------------------- */
.vm-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
}

.vm-login-card {
    width: 100%;
    max-width: 380px;
    padding: 40px 36px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.vm-login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vm-login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

/* -------------------------------------------------------------------------
   19b. Notlar
   ------------------------------------------------------------------------- */
/* Sekmedeki konu sayısı */
.vm-tab-count {
    margin-left: 5px;
    padding: 1px 6px;
    background: var(--page);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: var(--ink-muted);
}

.vm-tab i {
    margin-right: 5px;
}

/* Tema sekmesi seçiliyken sayfa vurgusu yerine kendi temasının rengini alır. */
.vm-tab-cat,
.vm-tab-cat:hover {
    color: var(--cat);
}

.vm-tab-cat::after {
    background: var(--cat);
}

.vm-tab-cat .vm-tab-count {
    background: var(--cat-soft);
    color: var(--cat);
}

/* Konu kartı */
.vm-topic {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
}

/* Kartın gövdesi tek bir bağlantı: her yerine tıklanınca detaya gider. */
.vm-topic-link {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vm-topic-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vm-topic-title {
    font-size: var(--fs-md);
    font-weight: 700;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.vm-topic-theme {
    margin-top: 1px;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--cat);
}

.vm-topic-desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: var(--fs-sm);
    line-height: 1.45;
    color: var(--ink-muted);
}

.vm-topic-desc-full {
    font-size: var(--fs-sm);
    line-height: 1.5;
    color: var(--ink-soft);
    white-space: pre-line;
}

/* Detay sayfasındaki geri bağlantısı */
.vm-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    align-self: flex-start;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--ink-muted);
    transition: color var(--dur-fast) var(--ease);
}

.vm-back:hover {
    color: var(--accent);
}

/* Hızlı not ekleme satırı */
.vm-note-add {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
}

.vm-note-add-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    outline: none;
    font-size: var(--fs-base);
    color: var(--ink);
}

.vm-note-add-input::placeholder {
    color: var(--ink-muted);
}

/* Not satırı */
.vm-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.vm-note:last-child {
    border-bottom: none;
}

.vm-note-body {
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--ink);
    white-space: pre-line;
    overflow-wrap: anywhere;
    transition: opacity var(--dur-fast) var(--ease);
}

.vm-note-done .vm-note-body {
    text-decoration: line-through;
    opacity: 0.55;
}

.vm-note-meta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    font-size: var(--fs-xs);
    color: var(--success);
}

.vm-note-edit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.vm-note-edit .vm-input {
    flex: 1;
    min-width: 180px;
}

/* Dokunmatik cihazda hover yok — eylemler her zaman görünür. */
.vm-note .vm-task-actions {
    opacity: 0;
}

.vm-note:hover .vm-task-actions,
.vm-note:focus-within .vm-task-actions {
    opacity: 1;
}

@media (hover: none) {
    .vm-note .vm-task-actions {
        opacity: 1;
    }
}

/* İstatistiklerdeki tema dağılımı satırı */
.vm-theme-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.vm-theme-row:last-child {
    border-bottom: none;
}

.vm-theme-row-body {
    flex: 1;
    min-width: 0;
}

.vm-theme-row-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
    font-size: var(--fs-sm);
}

/* -------------------------------------------------------------------------
   20. Yardımcı sınıflar
   ------------------------------------------------------------------------- */
.vm-stack   { display: flex; flex-direction: column; gap: 16px; }
.vm-stack-sm { display: flex; flex-direction: column; gap: 8px; }
.vm-row     { display: flex; align-items: center; gap: 10px; }
.vm-row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vm-wrap    { flex-wrap: wrap; }
.vm-grow    { flex: 1; min-width: 0; }
.vm-muted   { color: var(--ink-muted); }
.vm-soft    { color: var(--ink-soft); }
.vm-strong  { font-weight: 600; color: var(--ink); }
.vm-xs      { font-size: var(--fs-xs); }
.vm-sm      { font-size: var(--fs-sm); }
.vm-center  { text-align: center; }
.vm-right   { text-align: right; }
.vm-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vm-spin {
    animation: vm-spin 900ms linear infinite;
}

@keyframes vm-spin {
    to { transform: rotate(360deg); }
}

/* Görünürlük anahtarları.
   Bunlar dosyanın en sonunda durur: .vm-icon-btn gibi bileşen sınıfları da
   display kuruyor ve aynı özgüllükte oldukları için sonra gelen kazanır.
   Yukarıda tanımlansalardı masaüstünde mobil düğmesi görünür kalırdı. */
.vm-only-mobile { display: inline-flex; }
.vm-only-desktop { display: none; }

@media (min-width: 768px) {
    .vm-only-mobile { display: none; }
    .vm-only-desktop { display: inline-flex; }
}

/* Ekran okuyucular için görünür, gözle görünmez */
.vm-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
