﻿/* ------------------------------
   GENEL TEMA
------------------------------ */
/* ------------------------------
   GENEL TEMA
------------------------------ */
:root {
    /* Dark Mode - Premium Aesthetic (Classic Deep Blue) */
    --bg-page: #0f172a;
    --bg-grad-start: #1e293b;
    --bg-grad-end: #020617;

    --bg-card: #111827;
    --bg-card-soft: #020617;

    --accent: #38bdf8;
    --accent-soft: rgba(56, 189, 248, 0.15);
    --accent-strong: #0ea5e9;

    --text-main: #f1f5f9;
    --text-muted: #94a3b8;

    --danger: #ef4444;
    --success: #22c55e;

    --border-soft: rgba(148, 163, 184, 0.2);

    --radius-lg: 20px;
    --radius-md: 12px;
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.6);

    /* Dynamic Components */
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(148, 163, 184, 0.3);
    --header-bg: rgba(15, 23, 42, 0.95);

    --stat-bg: rgba(15, 23, 42, 0.85);
    --stat-border: rgba(56, 189, 248, 0.2);

    --cal-head-bg: #111827;
    --weekday-bg: #1e293b;

    --cell-bg: rgba(15, 23, 42, 0.9);
    --cell-border: rgba(56, 189, 248, 0.35);
    /* Glassy blue border */

    --profile-menu-bg: #1e293b;
    --profile-menu-border: rgba(56, 189, 248, 0.4);

    --search-dropdown-bg: #1e293b;
    --search-dropdown-border: rgba(56, 189, 248, 0.2);

    --btn-bg: rgba(255, 255, 255, 0.08);
    --btn-border: #334155;
    --btn-text: #f8fafc;

    --detail-bg: #0f172a;
    --event-border: rgba(148, 163, 184, 0.1);
    --cal-number: #ffffff;

    --theme-switch-bg: #475569;
    --theme-switch-btn: #ffffff;
}

body.light-mode {
    /* Light Mode - Soft Cream / Off-White (Eye-friendly) */
    --bg-page: #f5f5f4;
    --bg-grad-start: #fafafa;
    --bg-grad-end: #e7e5e4;

    --bg-card: #ffffff;
    --bg-card-soft: #fafaf9;

    --accent: #0284c7;
    --accent-soft: rgba(14, 165, 233, 0.06);
    --accent-strong: #0369a1;

    --text-main: #292524;
    --text-muted: #57534e;

    --danger: #ef4444;
    --success: #10b981;

    --border-soft: #d6d3d1;
    --shadow-soft: 0 4px 15px rgba(28, 25, 23, 0.05);

    --input-bg: #ffffff;
    --input-border: #d6d3d1;
    --header-bg: rgba(245, 245, 244, 0.98);

    --stat-bg: #ffffff;
    --stat-border: #d6d3d1;

    --theme-switch-bg: #cbd5e1;
    --theme-switch-btn: #ffffff;

    --cal-head-bg: #fafafa;
    --weekday-bg: #e7e5e4;

    --cell-bg: #ffffff;
    --cell-border: #d6d3d1;

    --profile-menu-bg: #ffffff;
    --profile-menu-border: #e2e8f0;
    --profile-menu-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);

    --search-dropdown-bg: #fff;
    --search-dropdown-border: #d6d3d1;

    --btn-bg: #f5f5f4;
    --btn-border: #d6d3d1;
    --btn-text: #292524;

    --detail-bg: #f5f5f4;
    --event-border: #e7e5e4;
    --cal-number: #44403c;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, var(--bg-grad-start) 0, var(--bg-grad-end) 55%);
    background-color: var(--bg-page);
    color: var(--text-main);
    min-height: 100vh;
}

/* Extra Roles */
.role-viewer {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

input,
button,
textarea,
select {
    font-family: inherit;
}

/* ------------------------------
   LAYOUT
------------------------------ */
.ascapp-root {
    max-width: 1280px;
    margin: 40px auto 60px auto;
    padding: 0 24px;
}

.ascapp-card {
    background: var(--bg-card);
    border-radius: 32px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-soft);
    padding: 24px 26px 32px 26px;
    position: relative;
}

/* ------------------------------
   NAVBAR
------------------------------ */
.ascapp-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

/* Logo + brand clickable */
.ascapp-brand-link {
    text-decoration: none;
    color: inherit;
}

.ascapp-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ascapp-logo-dot {
    width: 32px;
    height: 32px;
    border-radius: 14px;
    background: radial-gradient(circle at 30% 20%, #f97316, #f97316 25%, #1e293b 75%);
    box-shadow: 0 0 32px rgba(249, 115, 22, 0.6);
}

.ascapp-title-main {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.03em;
}

.nav-pill,
.nav-pill:hover,
.nav-pill:focus {
    text-decoration: none !important;
}

.ascapp-title-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.ascapp-nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-pill {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    padding: 4px 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-pill span {
    font-size: 11px;
    color: var(--text-muted);
}

.nav-pill-strong {
    border-radius: 999px;
    padding: 6px 12px;
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-pill-strong span {
    font-size: 11px;
    color: var(--text-main);
}

.nav-pill-strong .nav-pill-user {
    font-weight: 500;
}

.ascapp-nav-btn {
    border-radius: 999px;
    border: none;
    background: var(--btn-bg);
    color: var(--btn-text);
    padding: 8px 15px;
    font-size: 12px;

    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s ease-out;
}


.ascapp-nav-btn.logout-btn:hover {
    background: rgba(239, 68, 68, 0.85) !important;
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.45) !important;
    transform: translateY(-1px);
}


/* Navbar link active/passive */
.nav-link-top {
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-muted);
    border: 1px solid transparent;
    background: transparent;
    transition: all 0.18s;
}

.nav-link-top.active {
    color: var(--accent);
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(15, 23, 42, 0.9);
}

.nav-link-top:hover {
    color: var(--text-main);
}

/* NAV: Tamamlananlar hover animasyonu (yeşil) */
.nav-link-top.completed-hover:hover {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.5);
    color: #bbf7d0 !important;
    box-shadow: 0 12px 22px rgba(34, 197, 94, 0.35);
    transform: translateY(-1px);
}

.ascapp-user-badge {
    position: absolute;
    top: 24px;
    right: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.80);
    border: 1px solid rgba(148, 163, 184, 0.35);
    font-size: 12px;
    color: var(--text-main);
    backdrop-filter: blur(4px);
}

/* ------------------------------
   ALERT / MESAJ
------------------------------ */
.alert {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.alert-warning {
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.4);
    color: #fbbf24;
}

.alert-danger {
    background: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.4);
    color: #fca5a5;
}

/* ------------------------------
   AUTH FORMLAR (Giriş / Kayıt)
------------------------------ */
.auth-wrapper {
    display: flex;
    gap: 40px;
    align-items: center;
    min-height: 420px;
}

.auth-left-text {
    flex: 1.2;
    padding-right: 16px;
}

.auth-left-title {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 6px;
}

.auth-left-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.auth-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.auth-badge {
    font-size: 11px;
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.4);
    color: var(--text-muted);
}

.auth-right-card {
    flex: 1;
    border-radius: 24px;
    padding: 22px 20px 20px 20px;
    background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.18), transparent 60%),
        rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.4);
}

body.light-mode .auth-right-card {
    background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.08), transparent 60%),
        rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body.light-mode .auth-badge {
    background: rgba(226, 232, 240, 0.9);
    border-color: rgba(148, 163, 184, 0.5);
    color: var(--text-main);
}

/* Light mode - Team pages and forms */
body.light-mode .team-card,
body.light-mode .invitation-card,
body.light-mode .form-section,
body.light-mode .modal-content {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(148, 163, 184, 0.3);
}

body.light-mode .team-name,
body.light-mode .invitation-name,
body.light-mode .section-title,
body.light-mode .modal-header h3 {
    color: #1e293b;
}

body.light-mode .team-description,
body.light-mode .invitation-meta,
body.light-mode .stat-item {
    color: #64748b;
}

body.light-mode .member-item,
body.light-mode .collab-item,
body.light-mode .pending-invite-item {
    background: rgba(226, 232, 240, 0.5);
    border-color: rgba(148, 163, 184, 0.3);
}

body.light-mode .member-name,
body.light-mode .collab-user {
    color: #1e293b;
}

body.light-mode .member-email,
body.light-mode .collab-role {
    color: #64748b;
}

body.light-mode .role-select,
body.light-mode select.form-input {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(148, 163, 184, 0.4);
    color: #1e293b;
}

.form-title {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 500;
}

.form-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 12px;
    margin-bottom: 5px;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    border-radius: 999px;
    border: 1px solid var(--input-border);
    padding: 9px 12px;
    font-size: 13px;
    background: var(--input-bg);
    color: var(--text-main);
    outline: none;
    transition: all 0.15s ease-out;
}

.form-input option {
    background: var(--bg-card);
    color: var(--text-main);
}

.form-input:focus {
    border-color: rgba(56, 189, 248, 0.8);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
}

.form-input[type="file"] {
    padding: 7px 8px;
    border-radius: 14px;
}

.form-textarea {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--input-border);
    padding: 9px 12px;
    font-size: 13px;
    background: var(--input-bg);
    color: var(--text-main);
    outline: none;
    resize: vertical;
    min-height: 70px;
}

.form-textarea:focus {
    border-color: rgba(56, 189, 248, 0.8);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    color: #e5e7eb;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 6px;
    transition: all 0.18s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.55);
}

.auth-alt-link {
    margin-top: 15px;
    font-size: 12px;
    color: var(--text-muted);
}

.auth-alt-link a {
    color: var(--accent);
    text-decoration: none;
}

/* ------------------------------
   DASHBOARD ÜST BAŞLIK / ARAÇLAR
------------------------------ */
.dashboard-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.dashboard-title {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dashboard-title span {
    font-size: 12px;
    color: var(--text-muted);
}

.dashboard-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.new-project-btn {
    text-decoration: none;
    border-radius: 999px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #22c55e, #a3e635);
    color: #052e16;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.2);
    transition: transform 0.15s ease-out;
}

.new-project-btn:hover {
    transform: translateY(-1px);
}

.select-small {
    border-radius: 999px;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--text-main);
    padding: 6px 10px;
    font-size: 12px;
    outline: none;
}

/* ------------------------------
   TAKVİM ÜST AY BAR + GÜN BAŞLIKLARI
------------------------------ */
.calendar-header-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    margin-top: 4px;
}

.calendar-month-label {
    font-size: 15px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: var(--cal-head-bg);
    color: var(--text-main);
    cursor: pointer;
}

.calendar-nav-btn {
    border-radius: 999px;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-text);
    padding: 4px 9px;
    font-size: 11px;
    cursor: pointer;
    text-decoration: none;
}

/* Genel takvim satırı (üstte tek satır) */
.calendar-wrapper {
    margin-top: 2px;
}

.calendar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-title-spacer {
    width: 210px;
    flex-shrink: 0;
}

.project-actions-spacer {
    width: 130px;
    flex-shrink: 0;
}

/* Genel takvim çubuğu */
.calendar-global-row {
    margin-top: -4px;
}

/* ------------------------------
   HAFTANIN GÜNLERİ SATIRI
------------------------------ */
.calendar-weekday-row {
    margin-top: 0px;
    margin-bottom: 16px;
    /* High proximity to numbers */
    position: relative;
    z-index: 20;
    /* Above global cells */
}

.weekday-timeline {
    flex: 1;
    display: grid;
    gap: 4px;
}

.weekday-cell {
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-main);
    font-weight: 600;
    background: transparent !important;
    border: none !important;
}

/* ------------------------------
   PROJE LISTESI & SATIRLAR
------------------------------ */
.project-list {
    margin-top: 4px;
    /* Scroll özelliği (Header sabit kalsın diye) */
    height: calc(100vh - 190px);
    /* Ekran boyutuna göre ayarlar */
    overflow-y: auto;
    overflow-x: hidden;
    /* Yan kaydırmayı engelle */
    position: relative;
    padding-right: 8px;
    /* Scrollbar için boşluk */
    /* Scrollbar ince ayar (Firefox) */
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.3) rgba(15, 23, 42, 0.4);
}

/* Scrollbar Customization (Chrome/Safari) */
.project-list::-webkit-scrollbar {
    width: 6px;
}

.project-list::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 8px;
}

.project-list::-webkit-scrollbar-thumb {
    background-color: rgba(56, 189, 248, 0.3);
    border-radius: 8px;
}

.project-list::-webkit-scrollbar-thumb:hover {
    background-color: rgba(56, 189, 248, 0.5);
}

/* Light Mode Scrollbar Overrides */
body.light-mode .project-list {
    scrollbar-color: #cbd5e1 rgba(0, 0, 0, 0.05);
}

body.light-mode .project-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .project-list::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
}

body.light-mode .project-list::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

/* Sticky Header Wrapper */
.sticky-header-container {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--bg-page);
    padding-top: 4px;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.project-row-outer {
    margin-top: 7px;
}

.project-row {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    /* Removed overflow: hidden or anything that might clip tooltips */
}

.project-row:has(.custom-tooltip.show) {
    z-index: 2000;
    /* Ensure the WHOLE row stays on top when tooltip is active */
}

.cell-day-label {
    /* margin-top: -2px; removed for centering */
    line-height: normal;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.cell-day-number {
    font-size: 11px;
    font-weight: 700;
}

/* Sol: Proje başlık alanı */
.project-title-area {
    width: 210px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    padding: 10px 11px;
    background: var(--bg-card-soft);
    border: 1px solid var(--border-soft);
    cursor: pointer;
    transition: border 0.15s, transform 0.1s;
}

.project-title-area:hover {
    border-color: rgba(56, 189, 248, 0.8);
    transform: translateY(-1px);
}

.project-title-text {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 3px;
}

.project-meta {
    font-size: 11px;
    color: var(--text-muted);
}

/* Orta: Takvim hücreleri */
.project-timeline {
    flex: 1;
    display: grid;
    gap: 4px;
    align-self: center;
}

/* Hücreler */
.timeline-cell {
    position: relative;
    border-radius: 6px;
    border: 1px solid var(--cell-border);
    background: var(--cell-bg);
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--text-main);
    overflow: visible;
}

/* Genel takvim hücreleri için belirgin border */
/* Genel takvim hücreleri için belirgin border */
.global-timeline .timeline-cell {
    border: 2px solid var(--cell-border) !important;
    /* Thicker 2px border */
    background: var(--cell-bg);
    /* Ensure centering */
    display: flex;
    align-items: center;
    justify-content: center;
}

.global-timeline .timeline-cell.has-event {
    border: 2px solid rgba(255, 255, 255, 0.45) !important;
    /* Special has-event styling matches project calendar but thicker border */
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 6px rgba(0, 0, 0, 0.15);
    opacity: 0.88;
    font-weight: 700;
    backdrop-filter: blur(2px);
}

.global-timeline .timeline-cell.today-cell {
    /* White border removed as per user request for green arrow instead */
    z-index: 5;
}

/* Gün numarası */
.cell-day-number {
    position: relative;
    z-index: 2;
    font-size: 11px;
    color: var(--cal-number);
}

/* Etkinlik var */
.timeline-cell.has-event {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    /* Glassy border */
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 6px rgba(0, 0, 0, 0.15);
    /* Gloss & Shadow */
    opacity: 0.88;
    /* Slight transparency */
    font-weight: 700;
    backdrop-filter: blur(2px);
    transition: all 0.2s ease;
}

.timeline-cell.has-event:hover {
    transform: translateY(-2px) scale(1.05);
    opacity: 1;
    z-index: 10;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 8px 12px rgba(0, 0, 0, 0.25);
}

/* Bugün: yeşil ok göstergesi */
.timeline-cell.today-cell {
    position: relative;
    box-shadow: none;
    /* Kalın kenarlık kaldırıldı */
}

.timeline-cell.today-cell::after {
    content: "\f0d7";
    /* fa-caret-down hex code */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #22c55e;
    position: absolute;
    top: -15px;
    /* Hücrenin hemen üstünde */
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    z-index: 5;
    pointer-events: none;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

/* Sağ: Aksiyon butonları */
.project-actions {
    width: 130px;
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

/* Yuvarlak ikonlu butonlar */
.action-btn {
    border-radius: 999px;
    border: 1px solid var(--btn-border);
    width: 30px;
    height: 30px;
    font-size: 14px;
    cursor: pointer;
    background: var(--btn-bg);
    color: var(--btn-text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    transition: all 0.15s;
    padding: 0;
}

.action-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(56, 189, 248, 0.8);
}

.edit-btn {
    border-color: var(--accent);
    color: var(--accent);
}

.delete-btn {
    border-color: var(--danger);
    color: var(--danger);
}

.complete-btn {
    border-color: var(--success);
    color: var(--success);
}

/* ------------------------------
   PROJE DETAY BÖLÜMÜ
------------------------------ */
.project-detail {
    margin-left: 220px;
    margin-top: 6px;
    margin-bottom: 12px;
    display: none;
}

.project-detail-inner {
    background: var(--detail-bg);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid var(--border-soft);
    position: relative;
    /* overflow: hidden; Removed to ensure tooltips/popups aren't clipped if needed */
}

.project-detail-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}

.project-detail-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.event-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-top: 1px solid var(--event-border);
    font-size: 11px;
}

/* Olay içeriğini yan yana (tarih - metin) dizer */
.event-main {
    flex: 1;
    min-width: 0;
    margin-right: 6px;
    display: block;
}

.event-content-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 6px;
    /* Tarih ile Metin arası boşluk */
    margin-bottom: 2px;
}

.event-date-box {
    white-space: nowrap;
    flex-shrink: 0;
    /* Tarih kutusu küçülmesin */
    font-weight: 500;
}

.event-text-box {
    flex: 1;
    /* Geri kalan alanı kapla */
    white-space: normal;
    word-break: break-word;
    /* Gerekirse böl */
    line-height: 1.35;
}

.event-meta-line {
    font-size: 10px;
    color: var(--text-muted);
}

.event-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
    /* Butonların sıkışmasını engelle */
    margin-left: auto;
    /* Sağa yaslama garantisi */
}

.status-badge {
    border-radius: 999px;
    padding: 2px 6px;
    font-size: 10px;
    border: 1px solid transparent;
    min-width: 100px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.status-pending {
    border-color: var(--border-soft);
    color: var(--text-muted);
}

.status-done {
    border-color: var(--success);
    color: var(--success);
    background: var(--accent-soft);
}

.status-failed {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.status-btn {
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    padding: 2px 8px;
    font-size: 10px;
    cursor: pointer;
    background: var(--btn-bg);
    color: var(--text-main);
    transition: all 0.2s;
}

.status-btn:hover {
    filter: brightness(1.2);
}

/* ------------------------------
   PROJE FORMU (Yeni / Düzenle)
------------------------------ */
.project-form-wrapper {
    max-width: 760px;
    margin: 0 auto;
}

.project-form-section {
    border-radius: 22px;
    padding: 18px 18px 20px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    margin-bottom: 14px;
}

.project-form-section h2 {
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 4px;
}

.project-form-section p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 0;
    margin-bottom: 12px;
}

/* Proje başlığı input'u için ayrı stil */
.project-title-input {
    background: var(--bg-card-soft);
    border-color: var(--accent);
}

/* Etkinlik blokları */
.event-block {
    border-radius: 16px;
    padding: 10px 12px;
    background: var(--bg-card-soft);
    border: 1px solid var(--border-soft);
    margin-bottom: 10px;
    position: relative;
}

.event-block-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-block-row .form-group {
    margin-bottom: 0;
}

/* Etkinlik sil butonu */
.event-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    border-radius: 999px;
    border: 1px solid var(--danger);
    background: var(--bg-card);
    color: var(--danger);
    font-size: 10px;
    padding: 2px 8px;
    cursor: pointer;
}

.add-event-btn {
    border-radius: 999px;
    padding: 6px 12px;
    border: 1px dashed rgba(148, 163, 184, 0.7);
    background: transparent;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    margin-top: 6px;
}

/* ------------------------------
   TAMAMLANANLAR
------------------------------ */
.completed-list {
    margin-top: 16px;
}

.completed-item {
    border-radius: 18px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
}

.completed-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.completed-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.completed-actions {
    display: flex;
    gap: 6px;
}

/* ------------------------------
   AY/AY SEÇİCİ MODAL
------------------------------ */
.month-picker-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.month-picker-modal {
    width: 280px;
    max-width: 90%;
    background: var(--bg-card);
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    padding: 14px 16px 16px 16px;
}

.month-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 500;
}

.month-picker-close {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
}

.month-picker-months {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.month-picker-month-btn {
    width: 100%;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: var(--btn-bg);
    color: var(--text-main);
    font-size: 12px;
    padding: 6px 10px;
    text-align: left;
    cursor: pointer;
}

.month-picker-month-btn.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.modern-select:active,
.modern-select:focus {
    outline: none;
    background-color: var(--btn-bg) !important;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* --- Icon Style Buttons for Completed Page --- */
.icon-btn-red,
.icon-btn-green {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.icon-btn-red {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fecaca;
}

.icon-btn-red:hover {
    background: rgba(239, 68, 68, 0.35);
    transform: translateY(-1px);
}

.icon-btn-green {
    background: rgba(34, 197, 94, 0.20);
    border: 1px solid rgba(34, 197, 94, 0.6);
    color: #bbf7d0;
}

.icon-btn-green:hover {
    background: rgba(34, 197, 94, 0.40);
    transform: translateY(-1px);
}

/* ------------------------------
   RESPONSIVE
------------------------------ */
@media (max-width: 900px) {
    .auth-wrapper {
        flex-direction: column;
    }

    .project-row {
        flex-direction: column;
    }

    .project-title-area,
    .project-actions,
    .project-detail {
        width: 100%;
        margin-left: 0;
    }

    .project-detail-inner {
        margin-top: 4px;
    }

    .calendar-row {
        flex-direction: column;
    }

    .project-title-spacer,
    .project-actions-spacer {
        display: none;
    }

    .project-actions {
        justify-content: flex-start;
    }
}

/* Tarih input takvim ikonu - Theme-aware filters */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
    filter: invert(var(--cal-icon-invert, 1));
}

body.light-mode {
    --cal-icon-invert: 0;
}

input[type="date"]::-moz-calendar-picker-indicator,
input[type="month"]::-moz-calendar-picker-indicator {
    filter: invert(var(--cal-icon-invert, 1));
}

/* -----------------------------------
      PROFIL DROPDOWN (SAĞDA)
------------------------------------ */
.profile-dropdown {
    position: relative;
}

.profile-btn {
    padding: 7px 12px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-main);
    transition: 0.25s ease;
    margin-left: 8px;
}

.profile-btn:hover {
    background: rgba(56, 189, 248, 0.12);
    box-shadow: 0 8px 18px rgba(56, 189, 248, 0.35);
}

.ascapp-left {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.ascapp-nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-dropdown {
    position: relative;
}

.profile-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
}

/* Profile menu handled at the bottom */

.profile-dropdown:hover .profile-menu {
    display: block;
    visibility: visible;
    opacity: 1;
}

.profile-menu {
    transition: opacity 0.2s, visibility 0.2s;
    transition-delay: 0.5s;
    /* Increased delay as requested */
}

/* ------------------------------ */
/*   NAVBAR YENİLEME DÜZELTMESİ   */
/* ------------------------------ */

/* Sol logo + uygulama adı */
.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.ascapp-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff8f00, #ffb833);
    box-shadow: 0 0 10px rgba(255, 170, 60, 0.5);
}

/* STS yazıları */
.title-main {
    font-size: 20px;
    font-weight: 700;
    color: #d9c7ff;
}

.title-sub {
    font-size: 13px;
    color: #9f8bd3;
}

/* Sağdaki butonlar */
.nav-pill {
    padding: 8px 14px;
    border-radius: 14px;
    color: #d9c7ff;
    background: rgba(255, 255, 255, 0.06);
    transition: 0.25s;
}

.nav-pill:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Yeşil animasyonlu hover */
.nav-anim-green:hover {
    box-shadow: 0 0 10px #00ff95;
}

/* Kırmızı animasyonlu hover */
.nav-anim-red:hover {
    box-shadow: 0 0 10px #ff4f4f;
}

/* Profil dropdown */
.profile-dropdown {
    position: relative;
}

/* Profile dropdown - Handled in the main section at the bottom for better consolidation */
.profile-dropdown {
    position: relative;
}

.profile-btn {
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: 0.25s;
}

.profile-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.profile-dropdown.open .profile-menu {
    display: block;
}

.profile-menu a {
    display: block;
    padding: 6px 0;
    color: #d9c7ff;
    text-decoration: none;
    white-space: nowrap;
}

.profile-menu a:hover {
    color: #fff;
}

/* Proje detayındaki event satırı hizalama */
.event-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-top: 1px solid rgba(31, 41, 55, 0.8);
    font-size: 11px;
}

.event-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
}

/* Saat inputundaki siyah ikonun beyaz görünmesi için */
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* EVENT HİZALAMA - ZORUNLU OVERRIDE */
/* --------------------------
   EVENT BÖLÜMÜ FİNAL DÜZELTME
--------------------------- */

/* Event satırı */
.event-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 6px 0;
    border-top: 1px solid rgba(31, 41, 55, 0.8);
    font-size: 11px;
    width: 100%;
}

/* Sol kısım: tarih + saat + başlık */
.event-main {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    flex-grow: 1 !important;
    white-space: nowrap;
}

/* Sağ kısım (durum butonları) */
.event-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
}

/* ---- DASHBOARD HEADER FIX ---- */
.dashboard-header {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.dashboard-header .header-left {
    flex: 1;
    display: flex;
    align-items: center;
}

.dashboard-header .header-center {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 0 auto;
}

.dashboard-header .header-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* ---- NAVBAR SEARCH ---- */
.ascapp-search {
    margin-left: 24px;
}

.search-input {
    height: 34px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 13px;
    width: 200px;
    background-color: var(--input-bg);
    color: var(--text-main);
    border: 1px solid var(--input-border);
    transition: all 0.2s;
}

.search-input:focus {
    border-color: var(--accent);
    outline: none;
    width: 230px;
}

/* ================================
   GENEL TAKVİM – HOVER EVENT POPUP
   ================================ */

/* ================================
   GENEL TAKVİM & PROJE TAKVİMİ – HOVER EVENT POPUP
   ================================ */

/* Hücre referans olsun */
.timeline-cell {
    position: relative;
    overflow: visible;
}

/* Event listesi default gizli */
/* Event listesi tooltip */
/* Event listesi tooltip */
.cell-events {
    /* Initial State: Hidden but capable of animation */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* Mouse olaylarını engelle (arkaya geçsin) */

    /* Transition settings */
    transition: opacity 0.3s ease, visibility 0.3s ease;
    transition-delay: 0.35s;
    /* GİZLENİRKEN 0.35 saniye bekle */

    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 250px;
    max-width: 400px;
    background: rgba(20, 24, 38, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 8px;
    z-index: 999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

    /* Scroll ve yükseklik */
    max-height: 260px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.3) rgba(15, 23, 42, 0.4);
}

/* Hover kopmasını engellemek için görünmez köprü */
.cell-events::before {
    content: "";
    position: absolute;
    top: -20px;
    /* Çok daha yukarıdan başlasın */
    left: 0;
    width: 100%;
    height: 25px;
    /* Köprüyü kalınlaştır */
    background: transparent;
}

/* Tooltip Scrollbar (Chrome/Safari) */
.cell-events::-webkit-scrollbar {
    width: 4px;
}

.cell-events::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 4px;
}

.cell-events::-webkit-scrollbar-thumb {
    background-color: rgba(56, 189, 248, 0.3);
    border-radius: 4px;
}

/* Hover olunca aç */
/* Hover olunca aç */
.timeline-cell:hover .cell-events {
    /* display: block;  <-- ARTIK KULLANILMIYOR */
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    /* Artık tıklanabilir */
    transition-delay: 0s;
    /* GÖRÜNÜRKEN hiç bekleme, anında aç */
}

/* Tek tek event */
.cell-event {
    padding: 4px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cell-event:last-child {
    border-bottom: none;
}

/* Süreç adı */
.cell-event-title,
.cell-event-value {
    font-size: 12px;
    font-weight: 600;
    color: #ffd966;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Proje adı / Etiket */
.cell-event-project {
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    /* Default for dark mode */
    margin-bottom: 2px;
}

.cell-event-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 500;
    margin-right: 4px;
}

/* Light Mode Overrides for Tooltip */
body.light-mode .cell-events {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    /* Lighter shadow for light mode */
}

body.light-mode .cell-event {
    border-bottom: 1px solid #f1f5f9;
}

body.light-mode .cell-event-title,
body.light-mode .cell-event-value {
    color: #1e293b;
    /* Dark text for light mode */
}

body.light-mode .cell-event-label {
    color: #64748b;
    /* Muted label for light mode */
}

body.light-mode .cell-event-project {
    color: #334155 !important;
    /* Prominent dark color for light mode */
}

/* ----------------------------------------------------
   FLATPICKR MONTH SELECT MODERN REDESIGN
   ---------------------------------------------------- */
/* Ultra-aggressive targeting to override dark theme */
body.light-mode .flatpickr-calendar.monthSelect-theme-dark,
body.light-mode .flatpickr-calendar.monthSelect-theme-dark * {
    border-color: #e2e8f0 !important;
}

/* Force white background on ALL containers */
body.light-mode .flatpickr-calendar.monthSelect-theme-dark,
body.light-mode .flatpickr-calendar.monthSelect-theme-dark .flatpickr-months,
body.light-mode .flatpickr-calendar.monthSelect-theme-dark .flatpickr-month,
body.light-mode .flatpickr-calendar.monthSelect-theme-dark .flatpickr-innerContainer,
body.light-mode .flatpickr-calendar.monthSelect-theme-dark .flatpickr-monthSelect-months,
body.light-mode .flatpickr-calendar.monthSelect-theme-dark .flatpickr-days,
body.light-mode .flatpickr-calendar.monthSelect-theme-dark .flatpickr-month-footer,
body.light-mode .flatpickr-calendar.monthSelect-theme-dark>*,
body.light-mode .flatpickr-monthSelect-theme {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

/* CRITICAL: The months grid container background */
body.light-mode .flatpickr-monthSelect-months {
    background: #ffffff !important;
    background-color: #ffffff !important;
    padding: 12px !important;
}

/* CRITICAL: Year navigation header area - FULLY WHITE */
body.light-mode .flatpickr-calendar.monthSelect-theme-dark .flatpickr-months,
body.light-mode .flatpickr-calendar.monthSelect-theme-dark .flatpickr-month {
    background: #ffffff !important;
    background-color: #ffffff !important;
    padding: 16px 12px !important;
    border-radius: 12px 12px 0 0 !important;
}

/* Year text and navigation arrows - dark for visibility */
body.light-mode .flatpickr-calendar.monthSelect-theme-dark .flatpickr-current-month,
body.light-mode .flatpickr-calendar.monthSelect-theme-dark .cur-year,
body.light-mode .flatpickr-calendar.monthSelect-theme-dark .flatpickr-month,
body.light-mode .flatpickr-calendar.monthSelect-theme-dark .flatpickr-prev-month,
body.light-mode .flatpickr-calendar.monthSelect-theme-dark .flatpickr-next-month,
body.light-mode .flatpickr-calendar.monthSelect-theme-dark .flatpickr-prev-month svg,
body.light-mode .flatpickr-calendar.monthSelect-theme-dark .flatpickr-next-month svg {
    color: #1e293b !important;
    fill: #1e293b !important;
}

/* Modern arrow buttons with hover effect */
body.light-mode .flatpickr-calendar.monthSelect-theme-dark .flatpickr-prev-month,
body.light-mode .flatpickr-calendar.monthSelect-theme-dark .flatpickr-next-month {
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    padding: 6px !important;
}

body.light-mode .flatpickr-calendar.monthSelect-theme-dark .flatpickr-prev-month:hover,
body.light-mode .flatpickr-calendar.monthSelect-theme-dark .flatpickr-next-month:hover {
    background: #f1f5f9 !important;
}

/* Tooltip Arrow Fix */
body.light-mode .flatpickr-calendar.monthSelect-theme-dark:before,
body.light-mode .flatpickr-calendar.monthSelect-theme-dark:after {
    border-bottom-color: #ffffff !important;
}

/* Modern Month Buttons - Default State */
body.light-mode .flatpickr-monthSelect-month {
    color: #475569 !important;
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 10px !important;
    font-weight: 500 !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

/* Selected Month - Premium Highlight */
body.light-mode .flatpickr-monthSelect-month.selected {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35), 0 2px 4px rgba(14, 165, 233, 0.2) !important;
    transform: scale(1.02) !important;
}

/* Hover State - Smooth and modern */
body.light-mode .flatpickr-monthSelect-month:hover {
    background: #f1f5f9 !important;
    color: #0284c7 !important;
    border-color: #0284c7 !important;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.15) !important;
    transform: translateY(-1px) !important;
}

/* Footer - Clean and minimal */
body.light-mode .flatpickr-month-footer {
    border-top: 1px solid #e2e8f0 !important;
    background: #fafafa !important;
    padding: 12px !important;
    border-radius: 0 0 12px 12px !important;
}

/* Enhanced main calendar container */
body.light-mode .flatpickr-calendar.monthSelect-theme-dark {
    border-radius: 14px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #e2e8f0 !important;
    overflow: hidden !important;
}

/* Excel Dropdown Final Fix */
.excel-menu-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    z-index: 1000;
    min-width: 240px;
    padding: 8px 0;
    overflow: hidden;
    animation: fadeIn 0.2s ease;
}

.excel-menu-item {
    text-decoration: none;
    display: block;
    cursor: pointer;
    transition: all 0.2s;
}

.excel-menu-item div {
    padding: 10px 16px;
    color: var(--text-main);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.excel-menu-item:hover div {
    background: var(--accent-soft);
    color: var(--accent) !important;
}


/* Eski Tooltip override iptali - DOM yapısına geçildiği için data-tooltip artık kullanılmayacak */

/* Excel Menu Styles */
.excel-btn-modern {
    height: 40px;
    /* Same as new-project-btn likely */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.25s;
    background: rgba(34, 197, 94, 0.15);
    /* Transparent green */
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.excel-btn-modern:hover {
    background: rgba(34, 197, 94, 0.25);
    border-color: #22c55e;
    transform: translateY(-1px);
}

/* Updated Excel Info Tooltip Styles - Modern centered icon */
.excel-info-tooltip {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
    line-height: 1;
}

.excel-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-style: italic;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(251, 146, 60, 0.4);
    line-height: 1;
}

.excel-menu-content.show {
    display: block !important;
}

.collab-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.collab-avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card-soft);
    color: var(--text-main);
    font-size: 10px;
    font-weight: 600;
    border-radius: 50%;
    border: 1px solid var(--border-soft);
}

.collab-avatar-item {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: -8px;
    border: 2px solid var(--bg-card);
}

.collab-avatar-item:first-child {
    margin-left: 0;
}

.collab-avatar-item:hover {
    transform: translateY(-2px) scale(1.1);
    z-index: 10;
}


.excel-info-content {
    visibility: hidden;
    width: 280px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
    color: #e2e8f0;
    text-align: left;
    border-radius: 10px;
    padding: 14px 16px;
    position: absolute;
    z-index: 1001;
    top: 130%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    border: 1px solid rgba(251, 146, 60, 0.3);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(251, 146, 60, 0.1);
}

.excel-info-content::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent rgba(15, 23, 42, 0.98) transparent;
}

.excel-info-content a:hover {
    color: #fdba74 !important;
    border-bottom-color: #fdba74 !important;
}

/* Search Results Dropdown Styles */
.search-results-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--search-dropdown-bg);
    border: 1px solid var(--search-dropdown-border);
    border-radius: 8px;
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.search-result-item {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(56, 189, 248, 0.1);
    padding-left: 20px;
}

.search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: #38bdf8;
    margin-bottom: 4px;
}

.search-result-desc {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}

.search-no-results {
    padding: 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

#search-container {
    position: relative;
}



.cell-event-value.expanded,
.cell-event-title.expanded {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: break-word;
    cursor: pointer;
}

.cell-event-value {
    cursor: pointer;
    /* KullanÄ±cÄ± tÄ±klanabilir olduÄŸunu anlasÄ±n */
}



.cell-event-title,
.cell-event-value {
    white-space: normal !important;
    /* Allow wrapping */
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
    /* Adjust line height for better fit */
    max-height: 2.4em;
    /* Corresponds to 2 lines * 1.2 line-height */
}

/* Ensure expanded state overrides this */
.cell-event-value.expanded,
.cell-event-title.expanded {
    display: block !important;
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
    max-height: none !important;
}






/* Premium Profile Dropdown */
.profile-dropdown {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    padding: 6px 12px;
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.profile-btn:hover {
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-strong));
    border: 2px solid var(--accent-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* box-shadow removed as requested */
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-emoji {
    font-size: 18px;
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.profile-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1;
}

.profile-role {
    font-size: 10px;
    color: #94a3b8;
    line-height: 1;
}

.profile-arrow {
    color: #94a3b8;
    transition: transform 0.3s ease;
}

.profile-dropdown.open .profile-arrow {
    transform: rotate(180deg);
}

.profile-menu {
    position: absolute;
    top: 100%;
    margin-top: 5px;
    /* Bridge gap with pseudo or padding */
    padding-top: 0;
    right: 0;
    min-width: 300px;
    background: var(--profile-menu-bg);
    border: 1px solid var(--profile-menu-border);
    border-radius: 16px;
    padding: 12px;
    display: none;
    visibility: hidden;
    opacity: 0;
    z-index: 2500;
    box-shadow: var(--profile-menu-shadow, 0 12px 40px rgba(0, 0, 0, 0.5));
    box-shadow: var(--profile-menu-shadow, 0 12px 40px rgba(0, 0, 0, 0.5));
    backdrop-filter: blur(12px);
}

/* Hover Bridge Fix */
.profile-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px;
    /* Safe bridge area */
    background: transparent;
}

.profile-dropdown:hover .profile-menu {
    display: block;
    visibility: visible;
    opacity: 1;
    animation: profileMenuSlide 0.2s ease-out;
}

body.light-mode .profile-menu {
    backdrop-filter: none;
    /* Disabling blur in light mode to ensure it doesn't look dark/muddy */
}

.profile-dropdown.open .profile-menu {
    display: block;
    animation: profileMenuSlide 0.3s ease;
}

@keyframes profileMenuSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
}

.profile-menu-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-dark), var(--accent-strong));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 24px;
    flex-shrink: 0;
    border: 2px solid var(--accent-strong);
    /* box-shadow removed as requested */
}

.profile-menu-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-menu-info {
    flex: 1;
    min-width: 0;
}

.profile-menu-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-menu-email {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-menu-divider {
    height: 1px;
    background: var(--border-soft);
    margin: 8px 0;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.profile-menu-item:hover {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
}

.profile-menu-icon {
    font-size: 16px;
}

.profile-menu-logout {
    color: #fca5a5;
}

body.light-mode .profile-menu-logout {
    color: #ef4444;
    /* Clean red for light mode */
}

.profile-menu-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

body.light-mode .profile-menu-logout:hover {
    color: #dc2626;
}

body.light-mode .profile-menu-item {
    color: var(--text-main);
    /* Should be dark by default, but let's be explicit if it somehow stays light */
}


/* Nav Pill Blue Animation (Teams) */
.nav-anim-blue:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.5);
    color: #bfdbfe !important;
    box-shadow: 0 12px 22px rgba(56, 189, 248, 0.35);
    transform: translateY(-1px);
}


/* Proje Sahiplik ve Ortak KullanÄ±cÄ± Badge'leri */
.project-owner-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 999px;
    color: #22c55e;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.project-collab-badge {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 999px;
    color: #38bdf8;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}


/* ------------------------------ */
/* KURUMSAL BUTON TEMA (NAVBAR)   */
/* ------------------------------ */
.nav-pill-corporate {
    height: 36px;
    box-sizing: border-box;
    justify-content: center;
    border-radius: 8px;
    padding: 6px 14px;
    border-radius: 8px;
    padding: 6px 14px;
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    color: var(--text-muted);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 13px;
    text-decoration: none;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
}

.nav-pill-corporate:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Mavi tema (Ekipler vb.) */
.nav-corp-blue:hover,
.nav-corp-blue.active {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(56, 189, 248, 0.08);
    color: #38bdf8;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
}

/* Yeşil tema (Tamamlananlar vb.) */
.nav-corp-green:hover,
.nav-corp-green.active {
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.08);
    color: #4ade80;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

/* Bildirim Butonu (Sarı/Turuncu) */
.nav-corp-bell {
    padding: 0 12px;
    font-size: 16px;
}

.nav-corp-bell:hover {
    border-color: rgba(251, 191, 36, 0.5);
    background: rgba(251, 191, 36, 0.08);
    color: #fbbf24;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.15);
}

/* Kırmızı Yanıp Sönme Animasyonu */
@keyframes pulse-red-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.4);
        border-color: rgba(248, 113, 113, 0.6);
        color: #fca5a5;
    }

    50% {
        box-shadow: 0 0 12px 2px rgba(248, 113, 113, 0.25);
        border-color: #ef4444;
        color: #ef4444;
    }

    100% {
        box-shadow: 0 0 0 0 rgba(248, 113, 113, 0);
        border-color: rgba(248, 113, 113, 0.6);
        color: #fca5a5;
    }
}

.notification-active {
    animation: pulse-red-glow 2s infinite ease-in-out !important;
    background: rgba(239, 68, 68, 0.08) !important;
}

/* ----------------------------------------------------
   MODERN DASHBOARD ELEMENTS (Sort, Stats, Bulk Select)
   ---------------------------------------------------- */

/* Modern Select Dropdown - Glassmorphism & Custom Arrow */
.modern-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    border-radius: 12px;
    padding: 8px 32px 8px 16px;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    outline: none;
    transition: all 0.2s ease-out;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(4px);
}

.modern-select:hover {
    border-color: var(--accent);
    background-color: var(--input-bg);
    color: var(--text-main);
    box-shadow: 0 6px 15px rgba(56, 189, 248, 0.1);
    transform: translateY(-1px);
}

.modern-select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
    background-color: var(--img-bg, rgba(15, 23, 42, 0.95));
    /* fallback */
}

.modern-select option {
    background-color: var(--bg-card);
    color: var(--text-main);
    padding: 10px;
}

/* Stats Container (Left Side of Calendar) */
.project-stats-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding-left: 20px;
    gap: 12px;
    /* Space between stats and buttons */
}

/* Stats Badge (Total Count) */
.stats-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--stat-bg);
    border: 1px solid var(--stat-border);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    color: #94a3b8;
    width: fit-content;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stats-label {
    font-weight: 500;
}

.stats-value {
    color: #38bdf8;
    font-weight: 700;
    font-size: 13px;
}

/* Bulk Select Wrapper and Buttons */
.bulk-select-wrapper {
    display: flex;
    align-items: center;
    height: 24px;
}

/* The 'Toplu Seç' Button */
.bulk-select-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #38bdf8;
    text-decoration: none;
    background: rgba(56, 189, 248, 0.08);
    /* Minimal blue bg */
    border: 1px dashed rgba(56, 189, 248, 0.4);
    padding: 4px 12px;
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
}

.bulk-select-btn:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.8);
    color: #7dd3fc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.15);
}

/* Collaborator Avatars & Tooltip */
.collab-avatars-container {
    position: absolute;
    bottom: 22px;
    right: 4px;
    display: flex;
    gap: -6px;
    z-index: 4;
}

.collab-avatar-item {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    background: #64748b;
    color: #fff;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: -8px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.collab-avatar-item:first-child {
    margin-left: 0;
}

.collab-avatar-item:hover {
    z-index: 10;
    transform: translateY(-2px) scale(1.1);
    border-color: var(--accent);
}

.collab-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.collab-avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card-soft);
    color: var(--text-main);
    font-size: 10px;
    font-weight: 600;
    border-radius: 50%;
}

.project-role-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: 9px;
    padding: 2px 6px;
    border-top-left-radius: 6px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 5;
}

.role-owner {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-left: 1px solid rgba(245, 158, 11, 0.3);
    border-top: 1px solid rgba(245, 158, 11, 0.3);
}

.role-editor {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border-left: 1px solid rgba(56, 189, 248, 0.3);
    border-top: 1px solid rgba(56, 189, 248, 0.3);
}

.role-viewer {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border-left: 1px solid rgba(168, 85, 247, 0.3);
    border-top: 1px solid rgba(168, 85, 247, 0.3);
}

/* Modern Role Badges */
.badge-role-modern {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 10px;
    height: 26px;
    border-radius: 8px;
    font-size: 11px;
    /* Decreased font size for better fit */
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    box-sizing: border-box;
}

.badge-modern-blue {
    background: transparent !important;
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.badge-modern-purple {
    background: transparent !important;
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

/* Badge Select Styling */
select.badge-select {
    padding: 0 24px 0 10px;
    height: 26px;
    font-size: 11px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

select.badge-select.badge-modern-blue {
    background: transparent !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

select.badge-select.badge-modern-purple {
    background: transparent !important;
    color: #c084fc !important;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

select.badge-select option {
    background: #1e293b;
    color: inherit;
    font-weight: 600;
}

/* Custom Tooltip */
.custom-tooltip-wrapper {
    position: relative;
}

.custom-tooltip {
    visibility: hidden;
    position: absolute;
    top: calc(100% + 15px);
    /* Changed from bottom to top (downwards) */
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    color: var(--text-main);
    padding: 14px;
    border-radius: 16px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 2000;
    /* Very high to be in front */
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--accent);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* List view */
    gap: 12px;
    pointer-events: none;
    min-width: 180px;
    /* Wider for list */
}

.custom-tooltip.show {
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important;
    pointer-events: auto;
}

/* Removed specific img rule to allow shared class usage */
/* Tooltip Avatar (Shared for img and div) */
.tooltip-collab-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    color: var(--text-main);
    flex-shrink: 0;
    /* Important preventing shrink */
}

/* Ensure img tag picks up object-fit properly independently of flex */
img.tooltip-collab-avatar {
    display: block;
    /* Overwrite flex from shared class if it causes issues, though flex works on img too usually */
}

.custom-tooltip span {
    font-weight: 600;
    font-size: 12px;
}



/* Tooltip arrow - Flipped to top */
.custom-tooltip::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent var(--accent) transparent;
}

/* Tooltip List Item */
.tooltip-collab-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.collab-avatar-item:hover .custom-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

/* Progress Bar Green */
.progress-bar-green {
    background: linear-gradient(90deg, #22c55e, #86efac);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Premium Theme Switcher - Clean Sliding Toggle */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--theme-switch-bg);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    border-radius: 34px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.theme-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--theme-switch-btn);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked+.theme-slider {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

input:checked+.theme-slider:before {
    transform: translateX(20px);
}

.theme-slider:active:before {
    width: 24px;
    /* Stretch effect when clicked */
}

/* ------------------------------
   BİLDİRİM & DAVET KARTLARI
------------------------------ */

/* Invitation Card (Bekleyen Davetler) */
.invitation-card {
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(251, 191, 36, 0.15);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.98));
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    transition: all 0.2s;
}

.invitation-card .inv-title {
    font-size: 15px;
    font-weight: 600;
    color: #f1f5f9;
}

.invitation-card .inv-meta {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

/* Light Mode Overrides for Invitation */
body.light-mode .invitation-card {
    background: #ffffff;
    border: 1px solid rgba(251, 191, 36, 0.4);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.08);
}

body.light-mode .invitation-card .inv-title {
    color: #1e293b;
}

body.light-mode .invitation-card .inv-meta {
    color: #64748b;
}


/* Notification Item (Bildirim Geçmişi) */
.notification-item {
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.08);
    background: transparent;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: all 0.2s;
}

.notification-item .notif-title {
    font-size: 14px;
    font-weight: 600;
    color: #cbd5e1;
    /* Read text (dark mode) */
    margin-bottom: 4px;
}

.notification-item .notif-msg {
    font-size: 13px;
    color: #94a3b8;
    /* Read msg (dark mode) */
    line-height: 1.5;
}

/* Unread State */
.notification-item.unread {
    border-color: rgba(56, 189, 248, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

.notification-item.unread .notif-title {
    color: #f8fafc;
}

/* Light Mode Overrides for Notification */
body.light-mode .notification-item {
    border-color: rgba(148, 163, 184, 0.2);
    background: #ffffff;
}

body.light-mode .notification-item .notif-title {
    color: #334155;
    /* Read text (light mode) - Darker for readability */
}

body.light-mode .notification-item .notif-msg {
    color: #64748b;
}

body.light-mode .notification-item.unread {
    background: #f0f9ff;
    /* Light blue tint */
    border-color: rgba(2, 132, 199, 0.2);
}

body.light-mode .notification-item.unread .notif-title {
    color: #0369a1;
    font-weight: 700;
}

/* Invitation Role Badge */
.inv-role-badge {
    background: rgba(15, 23, 42, 0.6);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 12px;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

body.light-mode .inv-role-badge {
    background: #f8fafc;
    /* Very light gray */
    border-color: #e2e8f0;
    color: #475569;
}

/* Browser Native Date/Time Input Color Fix for Light Mode */
body.light-mode input[type="date"],
body.light-mode input[type="time"] {
    color: var(--text-main) !important;
    color-scheme: light;
}

body.light-mode ::-webkit-calendar-picker-indicator {
    filter: invert(0);
    /* Ensure icon is dark in light mode */
    opacity: 0.6;
}

/* ------------------------------
   EVENT NOTES STYLING
------------------------------ */

/* Note Button */
.btn-add-note {
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-add-note:hover {
    background: var(--accent);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.btn-add-note i {
    font-size: 14px;
}

/* Light Mode - Note Button */
body.light-mode .btn-add-note {
    background: rgba(2, 132, 199, 0.08);
    border-color: #0284c7;
    color: #0284c7;
}

body.light-mode .btn-add-note:hover {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

/* Notes Tooltip - Styling handled in JavaScript inline styles for dynamic content */
/* But we can add some baseclass styles if needed */
.notes-tooltip {
    font-family: inherit;
}

.notes-tooltip::-webkit-scrollbar {
    width: 4px;
}

.notes-tooltip::-webkit-scrollbar-track {
    background: var(--bg-card-soft);
}

.notes-tooltip::-webkit-scrollbar-thumb {
    background: var(--border-soft);
    border-radius: 10px;
}

.notes-tooltip::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ------------------------------
   NOTE BUTTON - YELLOW/WHITE THEME  
------------------------------ */

/* Note Button - Yellow/White Gradient */
.btn-add-note {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    border-radius: 6px;
    padding: 4px 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-add-note:hover {
    background: var(--accent);
    color: #ffffff;
    /* White icon on hover */
    border-color: var(--accent);
}

.btn-add-note.has-notes {
    color: #f59e0b;
    /* Orange text for existing notes */
    animation: note-pulse 2s infinite ease-in-out;
}

@keyframes note-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.btn-add-note:hover {
    background: linear-gradient(135deg, #fde68a, #fcd34d);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.btn-add-note i {
    font-size: 14px;
}

/* Light Mode - Note Button */
body.light-mode .btn-add-note {
    background: transparent;
    border-color: transparent;
    color: var(--text-muted);
    box-shadow: none;
}

body.light-mode .btn-add-note.has-notes {
    background: transparent;
    border-color: transparent;
    color: #f59e0b;
    box-shadow: none;
}

body.light-mode .btn-add-note:hover {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

body.light-mode .btn-add-note.has-notes:hover {
    background: rgba(245, 158, 11, 0.15);
}

/* ------------------------------
   CHAT BUBBLE FOR NOTE INPUT
------------------------------ */

.note-chat-bubble {
    position: absolute;
    /* bottom: controlled by JS or auto */
    left: 0;
    min-width: 300px;
    max-width: 90vw;
    width: max-content;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 2px solid #fbbf24;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 12px 32px rgba(251, 191, 36, 0.3);
    z-index: 2000;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s, transform 0.2s;
}

/* Chat bubble arrow/pointer (Default: pointing down) */
.note-chat-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #fbbf24;
}

/* Chat bubble arrow pointing UP (when bubble is below button) */
.note-chat-bubble.bubble-bottom::after {
    top: -10px;
    bottom: auto;
    border-top: none;
    border-bottom: 10px solid #fbbf24;
}

/* Textarea inside bubble */
.note-bubble-input {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #fbbf24;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: #78350f;
    font-family: inherit;
    resize: vertical;
    min-height: 70px;
    outline: none;
    transition: border-color 0.2s;
}

.note-bubble-input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}

.note-bubble-input::placeholder {
    color: #d97706;
    opacity: 0.5;
}

/* Bubble action buttons */
.note-bubble-btn {
    padding: 7px 14px;
    border-radius: 8px;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.note-bubble-cancel {
    background: rgba(120, 53, 15, 0.08);
    color: #78350f;
    border: 1px solid rgba(120, 53, 15, 0.2);
}

.note-bubble-cancel:hover {
    background: rgba(120, 53, 15, 0.15);
    transform: translateY(-1px);
}

.note-bubble-submit {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    flex: 1;
}

.note-bubble-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.note-bubble-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Light Mode - Chat Bubble */
body.light-mode .note-chat-bubble {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-color: #fbbf24;
    box-shadow: 0 12px 32px rgba(251, 191, 36, 0.2);
}

body.light-mode .note-bubble-input {
    background: #ffffff;
    border-color: #fbbf24;
    color: #78350f;
}