/* 
 * Dosya: ortak.css
 * Zen Tasarim Felsefesi - "Az, Coktur"
 * Minimalizm | Sadelik | Liquid Glass | Dogal Animasyonlar
 * Mobil Oncelikli Tam Uyumluluk
 */

/* ===== ZEN FONT ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

/* ===== ZEN RENK PALETI ===== */
:root {
    /* Isik ve Karanlik - Yumusak Gunduz Tonlari */
    --zen-beyaz: #1D1D1F;
    /* Ana Metin Rengi (Yumusak Siyah) */
    --zen-kar: #FFFFFF;
    /* Saf Beyaz */
    --zen-gece: #F5F7FA;
    /* Ana Arkaplan (Cok Acik Gri) */
    --zen-karanlik: #FFFFFF;
    /* Kart Arkaplani (Beyaz) */

    /* Notr Renkler */
    --zen-gri-1: #F5F5F7;
    --zen-gri-2: #E5E5EA;
    --zen-gri-3: #D1D1D6;
    --zen-gri-4: #8E8E93;
    /* Yardimci Metin */
    --zen-gri-5: #636366;
    /* Simge / Pasif Metin */
    --zen-gri-6: #48484A;
    --zen-gri-7: #3A3A3C;
    --zen-gri-8: #1C1C1E;
    /* Koyu Vurgular */

    /* Aksanlar - Canli ve Temiz */
    --zen-mavi: #007AFF;
    --zen-mavi-soft: rgba(0, 122, 255, 0.1);
    --zen-yesil: #34C759;
    --zen-kirmizi: #FF3B30;
    --zen-turuncu: #FF9500;
    --zen-mor: #AF52DE;

    /* Liquid Glass - Aydinlik */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-bg-dark: rgba(255, 255, 255, 0.85);
    /* Sidebar/Kart icin daha opak beyaz */
    --glass-border: rgba(0, 0, 0, 0.05);
    /* Hafif gri sinir */
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
    --glass-blur: blur(20px);

    /* Zen Gecisler */
    --ease-zen: cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 0.2s;
    --duration-normal: 0.3s;
    --duration-slow: 0.5s;

    /* Zen Golge - Aydinlik Modda Daha Belirgin */
    --shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-elevated: 0 16px 48px rgba(0, 0, 0, 0.12);

    /* Zen Yuvarlatma */
    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-collapsed: 72px;

    /* Safe Areas */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

/* ===== ZEN RESET ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    background: var(--zen-gece);
    color: var(--zen-beyaz);
    line-height: 1.5;
    letter-spacing: -0.01em;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

/* ===== ZEN TIPOGRAFI ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

h4 {
    font-size: 1.125rem;
}

p {
    color: var(--zen-gri-4);
    font-weight: 400;
}

a {
    color: var(--zen-mavi);
    text-decoration: none;
    transition: opacity var(--duration-fast) var(--ease-zen);
}

a:hover {
    opacity: 0.8;
}

/* ===== UYGULAMA KAPSAYICI ===== */
.uygulama-kapsayici {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

.ana-icerik {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: clamp(16px, 4vw, 32px);
    padding-top: calc(var(--safe-top) + clamp(16px, 4vw, 32px));
    padding-bottom: calc(var(--safe-bottom) + clamp(16px, 4vw, 32px));
    transition: margin-left var(--duration-normal) var(--ease-zen);
}

/* ===== ZEN SIDEBAR ===== */
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    background: var(--glass-bg-dark);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--duration-normal) var(--ease-zen),
        width var(--duration-normal) var(--ease-zen);
}

.sidebar-logo {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.sidebar-logo img {
    height: 48px;
    width: auto;
    max-width: 100%;
    opacity: 0.9;
}

.sidebar-logo-yazi {
    font-size: 15px;
    font-weight: 600;
    color: var(--zen-beyaz);
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.sidebar-menu {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}

.sidebar-menu::-webkit-scrollbar {
    display: none;
}

.sidebar-menu-baslik {
    padding: 20px 20px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--zen-gri-5);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    margin: 2px 8px;
    border-radius: var(--radius-sm);
    color: var(--zen-gri-4);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--duration-fast) var(--ease-zen);
}

.sidebar-link:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--zen-beyaz);
}

.sidebar-link.aktif {
    background: var(--zen-mavi-soft);
    color: var(--zen-mavi);
}

.sidebar-link-ikon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-kullanici {
    margin-top: auto;
    padding: 16px 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--zen-mavi), var(--zen-mor));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--zen-kar);
    flex-shrink: 0;
}

.sidebar-kullanici-bilgi {
    flex: 1;
    min-width: 0;
}

.sidebar-kullanici-ad {
    font-size: 14px;
    font-weight: 600;
    color: var(--zen-beyaz);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-kullanici-rol {
    font-size: 12px;
    color: var(--zen-gri-5);
}

.sidebar-cikis-btn {
    padding: 8px;
    border-radius: var(--radius-xs);
    transition: background var(--duration-fast) var(--ease-zen);
    text-decoration: none;
}

.sidebar-cikis-btn:hover {
    background: rgba(255, 59, 48, 0.12);
}

/* ===== ZEN KARTLAR ===== */
.kart {
    background: var(--glass-bg-dark);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: clamp(20px, 4vw, 28px);
    transition: transform var(--duration-normal) var(--ease-zen),
        box-shadow var(--duration-normal) var(--ease-zen);
}

.kart:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
}

/* ===== ZEN BUTONLAR ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-zen);
    -webkit-tap-highlight-color: transparent;
}

.btn:active {
    transform: scale(0.98);
}

.btn-birincil {
    background: var(--zen-mavi);
    color: var(--zen-kar);
}

.btn-birincil:hover {
    background: #0066DD;
}

.btn-ikincil {
    background: var(--zen-gri-7);
    color: var(--zen-beyaz);
}

.btn-anahat {
    background: transparent;
    border: 1.5px solid var(--zen-gri-6);
    color: var(--zen-beyaz);
}

.btn-anahat:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* ===== ZEN FORMLAR ===== */
.form-grubu {
    margin-bottom: 20px;
}

.form-etiket {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--zen-gri-4);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: #FFFFFF;
    border: 1px solid var(--zen-gri-3);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    color: var(--zen-birincil-metin, #1D1D1F);
    transition: all var(--duration-fast) var(--ease-zen);
}

.form-input::placeholder {
    color: var(--zen-gri-5);
}

.form-input:focus {
    outline: none;
    border-color: var(--zen-mavi);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px var(--zen-mavi-soft);
}

/* ===== ZEN HOSGELDIN ===== */
.hosgeldin-kapsayici {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 64px);
    min-height: calc(100dvh - 64px);
    text-align: center;
    padding: clamp(24px, 6vw, 48px);
}

.hosgeldin-emoji {
    font-size: clamp(56px, 15vw, 80px);
    margin-bottom: 24px;
    animation: zen-float 3s ease-in-out infinite;
}

@keyframes zen-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.hosgeldin-baslik {
    font-size: clamp(1.5rem, 6vw, 2.25rem);
    font-weight: 600;
    color: var(--zen-beyaz);
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}

.hosgeldin-altbaslik {
    font-size: clamp(0.875rem, 3vw, 1rem);
    color: var(--zen-gri-4);
    margin-bottom: 32px;
}

.hosgeldin-bilgi-kart {
    background: var(--glass-bg-dark);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: clamp(24px, 5vw, 32px);
    width: 100%;
    max-width: 400px;
}

.hosgeldin-bilgi-satir {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    gap: 16px;
}

.hosgeldin-bilgi-satir:last-child {
    border-bottom: none;
}

.hosgeldin-bilgi-etiket {
    font-size: 14px;
    color: var(--zen-gri-4);
}

.hosgeldin-bilgi-deger {
    font-size: 14px;
    font-weight: 600;
    color: var(--zen-beyaz);
    text-align: right;
}

.hosgeldin-eylemler {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ===== ROL ETIKETLERI ===== */
.rol-etiketi {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.rol-etiketi.admin {
    background: rgba(255, 59, 48, 0.15);
    color: var(--zen-kirmizi);
}

.rol-etiketi.yonetim {
    background: rgba(175, 82, 222, 0.15);
    color: var(--zen-mor);
}

.rol-etiketi.proje-muduru {
    background: rgba(175, 82, 222, 0.15);
    color: var(--zen-mor);
}

.rol-etiketi.proje-yoneticisi {
    background: rgba(0, 122, 255, 0.15);
    color: var(--zen-mavi);
}

.rol-etiketi.finans-muduru {
    background: rgba(52, 199, 89, 0.15);
    color: var(--zen-yesil);
}

.rol-etiketi.finans {
    background: rgba(52, 199, 89, 0.15);
    color: var(--zen-yesil);
}

.rol-etiketi.muhasebe-muduru {
    background: rgba(255, 149, 0, 0.15);
    color: var(--zen-turuncu);
}

.rol-etiketi.muhasebe {
    background: rgba(255, 149, 0, 0.15);
    color: var(--zen-turuncu);
}

.rol-etiketi.santiye-sefi {
    background: rgba(52, 199, 89, 0.15);
    color: var(--zen-yesil);
}

.rol-etiketi.taseron {
    background: rgba(255, 149, 0, 0.15);
    color: var(--zen-turuncu);
}

/* ===== ZEN TOAST BILDIRIM ===== */
#bildirim-konteyneri {
    position: fixed;
    top: calc(var(--safe-top) + 20px);
    right: calc(var(--safe-right) + 20px);
    left: calc(var(--safe-left) + 20px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    pointer-events: none;
}

.bildirim {
    max-width: 380px;
    width: 100%;
    padding: 16px 20px;
    background: var(--glass-bg-dark);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--zen-beyaz);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-elevated);
    transform: translateX(120%);
    opacity: 0;
    transition: all var(--duration-normal) var(--ease-bounce);
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bildirim.aktif {
    transform: translateX(0);
    opacity: 1;
}

.bildirim-icerik {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.bildirim-ikon {
    font-size: 18px;
    flex-shrink: 0;
}

.bildirim-kapat {
    background: transparent;
    border: none;
    color: var(--zen-gri-5);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    transition: color var(--duration-fast);
}

.bildirim-kapat:hover {
    color: var(--zen-beyaz);
}

.bildirim-bilgi {
    border-left: 3px solid var(--zen-mavi);
}

.bildirim-basari {
    border-left: 3px solid var(--zen-yesil);
}

.bildirim-hata {
    border-left: 3px solid var(--zen-kirmizi);
}

.bildirim-uyari {
    border-left: 3px solid var(--zen-turuncu);
}

/* ===== YUKLEYICI ===== */
.yukleyici {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.yukleyici-nokta {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--zen-mavi);
    animation: zen-pulse 1.2s ease-in-out infinite;
}

.yukleyici-nokta:nth-child(2) {
    animation-delay: 0.15s;
}

.yukleyici-nokta:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes zen-pulse {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== MOBIL UYUMLULUK ===== */

/* Tablet */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.acik {
        transform: translateX(0);
    }

    .ana-icerik {
        margin-left: 0;
    }
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    z-index: 99;
    transition: all var(--duration-normal) var(--ease-zen);
}

.sidebar-overlay.aktif {
    opacity: 1;
    visibility: visible;
}

/* Mobil */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 100%;
    }

    .hosgeldin-bilgi-satir {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .hosgeldin-bilgi-deger {
        text-align: left;
    }

    .hosgeldin-eylemler {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
    }

    .hosgeldin-eylemler .btn {
        width: 100%;
    }

    #bildirim-konteyneri {
        align-items: stretch;
    }

    .bildirim {
        max-width: none;
    }
}

/* Kucuk Mobil */
@media (max-width: 375px) {
    .hosgeldin-baslik {
        font-size: 1.375rem;
    }

    .hosgeldin-bilgi-kart {
        padding: 20px;
    }

    .btn {
        padding: 14px 20px;
    }
}

/* Koyu Mod Tercih Kontrolu */
@media (prefers-color-scheme: light) {
    /* Sistem acik tema isterse, biz yine koyu kaliyoruz - uygulama modu */
}

/* Hareket Azaltma */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Yuksek Kontrast */
@media (prefers-contrast: high) {
    :root {
        --glass-border: rgba(255, 255, 255, 0.3);
    }

    .btn {
        border: 1px solid currentColor;
    }
}