/* ============================================ */
/*  ORTAK STİLLER (common.css)                  */
/*  Tüm sayfalar tarafından paylaşılan stiller  */
/* ============================================ */

/* --- CSS Değişkenleri --- */
:root {
    --primary: #333;
    --primary-dark: #000;
    --bg-color: #fcfcfd;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
    --info: #2563eb;
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Font Ailesi --- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ============================================ */
/*  MODAL SİSTEMİ                               */
/* ============================================ */
#modernMsgModal {
    z-index: 999999 !important;
}

.modal {
    display: none;
    position: fixed;
    z-index: 5000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: var(--radius-lg);
    width: 95%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalSlide 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 18px;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 17px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body {
    margin: 25px 0;
    line-height: 1.6;
    font-size: 15px;
    color: #475569;
    text-align: center;
    font-weight: 500;
}

.modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    justify-content: flex-end;
}

.modal-footer button {
    padding: 0 25px;
    height: 46px;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ============================================ */
/*  MODAL BUTONLARI                              */
/* ============================================ */
.btn-modern-action {
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #000 !important;
}

.btn-modern-action:hover {
    background: #333 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-modern-dark {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}

.btn-modern-dark:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
    transform: translateY(-2px);
}

.btn-modern-danger {
    background: #fff !important;
    color: var(--danger) !important;
    border: 1px solid var(--danger) !important;
}

.btn-modern-danger:hover {
    background: var(--danger) !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

/* ============================================ */
/*  FOOTER                                       */
/* ============================================ */
.page-footer {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    color: #999;
    font-size: 11px;
    font-weight: 500;
}

.page-footer img {
    opacity: 0.6;
    margin-bottom: 8px;
}

#footerLogo {
    filter: grayscale(1);
    opacity: 0.5;
    transition: all 0.3s;
}

#footerLogo:hover {
    opacity: 0.8;
}

#footerText {
    color: #94a3b8 !important;
    font-size: 11px;
    font-weight: 500;
}

/* ============================================ */
/*  BUTON SİSTEMİ (Global)                      */
/* ============================================ */
.btn {
    height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    border: 1px solid #e2e8f0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    background: #fff;
    color: #1e293b;
    box-sizing: border-box;
}

.btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-back {
    background: #fff !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
}

.btn-back:hover {
    background: #f8fafc !important;
    color: #1e293b !important;
    border-color: #cbd5e1 !important;
}

.btn i {
    font-size: 14px;
}

/* ============================================ */
/*  AUTOFILL Override                            */
/* ============================================ */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #f8fafc inset !important;
    -webkit-text-fill-color: var(--text-color) !important;
    transition: background-color 5000s ease-in-out 0s;
}

input:-internal-autofill-selected {
    appearance: none !important;
    background-image: none !important;
    background-color: #f8fafc !important;
    color: var(--text-color) !important;
}

/* ============================================ */
/*  YÜKLEME EKRANI                               */
/* ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    transition: opacity 0.4s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ============================================ */
/*  TOAST BİLDİRİMLERİ                           */
/* ============================================ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #fff;
    border-radius: var(--radius);
    padding: 14px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border-left: 4px solid #000;
    font-size: 13px;
    font-weight: 600;
    animation: toastIn 0.3s ease;
    max-width: 350px;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================ */
/*  HEADER SİSTEMİ (Master - Unified)           */
/* ============================================ */
.header-wrapper {
    position: sticky;
    top: 0;
    z-index: 3000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin: -20px -20px 30px -20px;
    padding: 15px 20px;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
}

.header-panel {
    width: 100%;
}

.header-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-info-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.header-logo {
    max-height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
    cursor: pointer;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: #fff;
    color: #475569;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    flex-shrink: 0;
    transition: var(--transition);
}

.brand-icon:hover {
    background: #f8fafc;
    color: #000;
    border-color: #cbd5e1;
}

.header-info-text {
    display: flex;
    flex-direction: column;
}

.header-info-text h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #000;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.header-info-text p {
    margin: 3px 0 0 0;
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
    line-height: 1.2;
}

/* Period Selector Container (Master) */
.period-selector-container {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #ffffff;
    padding: 6px 6px 6px 15px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.selector-label {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.period-dropdown-wrapper {
    position: relative;
    flex: 1;
}

.btn-period-modern {
    width: 100%;
    height: 42px;
    padding: 0 15px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    transition: var(--transition);
}

.btn-period-modern:hover {
    border-color: #cbd5e1;
    background: #fcfcfd;
}

.btn-period-modern i {
    color: #64748b;
}

/* ============================================ */
/* PERİYOT DROPDOWN MENU VE STİLLERİ            */
/* ============================================ */
.body-blur-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    /* Biraz daha belirgin karartma */
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: 900;
    /* Mobil Header'ın (1000) ve normal Header'ın (3000) altında kalması için düşürüldü */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.body-blur-overlay.active {
    opacity: 1;
    visibility: visible;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Mobil görünümde blur dizinini (overlay) tamamen kaldır */
@media (max-width: 768px) {
    .body-blur-overlay {
        display: none !important;
    }
}

.period-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 280px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 2500;
    display: none;
    flex-direction: column;
    padding: 8px;
    max-height: 400px;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.period-dropdown-menu.active {
    display: flex;
    animation: dropdownShow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownShow {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 10px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    transition: 0.2s;
}

.dropdown-item:hover {
    background: #f1f5f9;
    color: #000;
}

.dropdown-item i {
    color: #64748b;
    font-size: 14px;
}

.dropdown-item.active {
    background: #000;
    color: #fff;
}

.dropdown-item.active i {
    color: #fff;
}

/* Modern Açıklama Alanı Tasarımı */
.modern-aciklama-wrapper {
    position: relative;
    max-width: 350px;
    padding: 2px 0;
}

.modern-aciklama-text {
    font-size: 12.5px;
    color: #475569;
    line-height: 1.6;
    max-height: 2.6em;
    /* Yaklaşık 2 satır */
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
}

.modern-aciklama-wrapper.expanded .modern-aciklama-text {
    max-height: 1000px;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
    color: #1e293b;
}

.modern-aciklama-more {
    font-size: 9px;
    font-weight: 800;
    color: #000;
    cursor: pointer;
    text-transform: uppercase;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 0.5px;
    opacity: 0.6;
    transition: 0.2s;
}

.modern-aciklama-more:hover {
    opacity: 1;
}

.modern-aciklama-wrapper.expanded .modern-aciklama-more {
    color: #94a3b8;
}

.modern-aciklama-wrapper.expanded .modern-aciklama-more .more-text::after {
    content: "KAPAT";
}

.modern-aciklama-wrapper.expanded .modern-aciklama-more i {
    transform: rotate(180deg);
}

.modern-aciklama-more .more-text::after {
    content: "DAHA FAZLA";
}

.modern-aciklama-small {
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.6;
}

.header-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

/* Common Control Elements */
.user-pill {
    height: 42px;
    background: #f8fafc;
    padding: 0 15px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.notification-alert {
    padding: 8px 15px;
    background: #fff1f2;
    color: #e11d48;
    border: 1px solid #fecdd3;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    animation: pulse-danger 2s infinite;
}

@keyframes pulse-danger {
    0% {
        box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(225, 29, 72, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(225, 29, 72, 0);
    }
}

.nav-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    text-decoration: none;
}

.nav-btn:hover {
    background: #f8fafc;
    color: #000;
    border-color: #cbd5e1;
}

.nav-btn.has-text {
    width: auto;
    min-width: 42px;
    padding: 0 15px;
    font-size: 12.5px;
    font-weight: 700;
    gap: 8px;
}

.nav-btn.has-text i {
    font-size: 15px;
}

/* Tematik Hover Efektleri */
.nav-btn.hover-blue:hover {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

.nav-btn.hover-red:hover {
    background: #fef2f2;
    color: #e11d48;
    border-color: #fecdd3;
}

.nav-btn.hover-purple:hover {
    background: #faf5ff;
    color: #9333ea;
    border-color: #e9d5ff;
}

.nav-btn-logout:hover {
    background: #fff1f2;
    color: #e11d48;
    border-color: #fecdd3;
}

/* ============================================ */
/*  MOBİL UYUMLULUK SORGULARI (Responsive)      */
/* ============================================ */
@media screen and (max-width: 768px) {

    /* Modallar Mobilde Tam Genişliğe Yakın */
    .modal-content {
        width: 95%;
        padding: 20px;
        margin: 10px;
    }

    .modal-header h3 {
        font-size: 15px;
    }

    /* Toast Bildirimleri Mobilde Üst Ortaya */
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
    }

    .toast {
        max-width: none;
        width: 100%;
    }

    .header-wrapper {
        position: static !important;
        margin: 0 -15px 20px -15px !important;
        padding: 10px 15px !important;
    }

    .header-container {
        padding: 15px 15px !important;
    }

    .header-main-row {
        flex-direction: column !important;
        gap: 15px !important;
        align-items: stretch !important;
    }

    .header-info-brand {
        flex-direction: row !important;
        justify-content: flex-start !important;
        width: 100% !important;
        gap: 12px !important;
    }

    .brand-icon {
        width: 42px !important;
        height: 42px !important;
        font-size: 18px !important;
    }

    .header-logo {
        max-height: 38px !important;
    }

    .header-info-text h1 {
        font-size: 16px !important;
    }

    .header-info-text p {
        font-size: 10.5px !important;
    }

    .period-selector-container {
        width: 100% !important;
        flex-direction: column !important;
        /* Force column */
        align-items: center !important;
        justify-content: center !important;
        padding: 18px 15px !important;
        /* Balanced padding */
        background: #fff !important;
        /* Matches buttons */
        border: 1px solid #eef2f7 !important;
        /* Light premium border */
        border-radius: 15px !important;
        margin: 0 0 10px 0 !important;
        /* Consistent bottom margin */
        gap: 12px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
        box-sizing: border-box !important;
    }

    .selector-label {
        width: 100% !important;
        justify-content: center !important;
    }

    .header-controls {
        width: 100% !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        padding-top: 5px;
    }

    .user-pill,
    .nav-btn {
        flex: 1;
        justify-content: center;
        min-width: 100px;
    }

    .nav-btn-logout {
        flex: 0 0 50px;
    }

    .main-container {
        padding: 0 15px !important;
    }
}