/* ============================================
   KAHYA — İş Yönetim Sistemi
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================
   THEME VARIABLES — LIGHT (Default)
   ============================================ */
:root {
    --sidebar-width: 260px;
    --sidebar-bg: linear-gradient(180deg, #0f1729 0%, #162236 100%);
    --sidebar-border: rgba(255,255,255,0.06);
    --sidebar-hover: rgba(59, 91, 219, 0.12);
    --sidebar-active: linear-gradient(135deg, #3b5bdb 0%, #5f3dc4 100%);
    --sidebar-active-shadow: rgba(59, 91, 219, 0.35);

    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f5f7fa;
    --bg-hover: #e2e8f0;
    --bg-card: #ffffff;

    --text-primary: #1a1a2e;
    --text-secondary: #64748b;
    --text-muted: #9ca3af;

    --border-color: #e5e7eb;
    --shadow-color: rgba(0,0,0,0.08);

    --primary: #3b5bdb;
    --primary-hover: #364fc7;
    --primary-light: rgba(59, 91, 219, 0.08);
    --accent-gradient: linear-gradient(135deg, #3b5bdb 0%, #5f3dc4 100%);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --shadow-sm: 0 1px 3px var(--shadow-color);
    --shadow-md: 0 4px 6px -1px var(--shadow-color);
    --shadow-lg: 0 10px 15px -3px var(--shadow-color);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --transition: all 0.3s ease;
}

/* ============================================
   THEME VARIABLES — DARK
   ============================================ */
:root.dark-theme {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-hover: #475569;
    --bg-card: #1e293b;

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-color: #334155;
    --shadow-color: rgba(0,0,0,0.3);
}

/* ============================================
   BASE
   ============================================ */
* { box-sizing: border-box; }

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

@media (min-width: 768px) {
    html { font-size: 14.5px; }
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--bg-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f1729 0%, #162236 40%, #1a2744 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59,91,219,0.2) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(95,61,196,0.15) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-30px); }
}

.login-card {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-xl);
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo .logo-icon {
    width: 80px;
    height: 80px;
    background: transparent;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    overflow: hidden;
}

.login-logo .logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-logo h2 {
    color: #fff;
    font-weight: 700;
    font-size: 1.6rem;
    margin: 0 0 0.25rem;
}

.login-logo p {
    color: rgba(255,255,255,0.4);
    font-size: 0.85rem;
    margin: 0;
}

.login-card .form-label {
    color: rgba(255,255,255,0.6);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-card .form-control {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.login-card .form-control::placeholder { color: rgba(255,255,255,0.25); }
.login-card .form-control:focus {
    background: rgba(255,255,255,0.08);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,91,219,0.25);
    color: #fff;
}

.login-card .btn-login {
    width: 100%;
    padding: 12px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.login-card .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59,91,219,0.5);
}

.login-error {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: #fca5a5;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    border-right: 1px solid var(--sidebar-border);
    transition: width 0.3s ease;
}

.sidebar-brand {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-decoration: none !important;
    height: 64px;
}

.sidebar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: transparent;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-brand .brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-brand span {
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.5px;
}

.sidebar-brand small {
    display: block;
    color: rgba(255,255,255,0.3);
    font-size: 0.62rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
}

.sidebar-section { margin-bottom: 8px; }

.sidebar-section-title {
    color: rgba(255,255,255,0.4);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px 16px 8px;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: rgba(255,255,255,0.7) !important;
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 3px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.sidebar .nav-link i {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
    transition: var(--transition);
}

.sidebar .nav-link:hover {
    background: var(--sidebar-hover);
    color: rgba(255,255,255,0.9) !important;
}

.sidebar .nav-link.active {
    background: var(--sidebar-active) !important;
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 4px 15px var(--sidebar-active-shadow);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sidebar-user-info .name {
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    font-size: 13px;
    display: block;
}

.sidebar-user-info .role {
    color: rgba(255,255,255,0.3);
    font-size: 11px;
    display: block;
}

.btn-logout {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: rgba(220,53,69,0.12);
    border: 1px solid rgba(220,53,69,0.2);
    color: #ff6b6b;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
}

.btn-logout:hover {
    background: rgba(220,53,69,0.22);
    color: #ff8a8a;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
    background: var(--bg-primary);
}

/* ============================================
   TOP HEADER
   ============================================ */
.top-header {
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-secondary);
    box-shadow: 0 1px 3px var(--shadow-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    transition: background 0.3s ease;
    flex-shrink: 0;
    box-sizing: border-box;
}

.top-header .page-title {
    font-weight: 600;
    font-size: 20px;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-actions .btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-size: 1rem;
}

.header-actions .btn-icon:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

/* ============================================
   THEME SWITCH (Sun/Moon animated toggle)
   ============================================ */
.theme-switch {
    --toggle-size: 12px;
    --container-width: 5.625em;
    --container-height: 2.5em;
    --container-radius: 6.25em;
    --container-light-bg: #3D7EAE;
    --container-night-bg: #1D1F2C;
    --circle-container-diameter: 3.375em;
    --sun-moon-diameter: 2.125em;
    --sun-bg: #ECCA2F;
    --moon-bg: #C4C9D1;
    --spot-color: #959DB1;
    --circle-container-offset: calc((var(--circle-container-diameter) - var(--container-height)) / 2 * -1);
    --stars-color: #fff;
    --clouds-color: #F3FDFF;
    --back-clouds-color: #AACADF;
    --transition: .5s cubic-bezier(0, -0.02, 0.4, 1.25);
    --circle-transition: .3s cubic-bezier(0, -0.02, 0.35, 1.17);
}

.theme-switch, .theme-switch *, .theme-switch *::before, .theme-switch *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-size: var(--toggle-size);
}

.theme-switch__container {
    width: var(--container-width);
    height: var(--container-height);
    background-color: var(--container-light-bg);
    border-radius: var(--container-radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0em -0.062em 0.062em rgba(0, 0, 0, 0.25), 0em 0.062em 0.125em rgba(255, 255, 255, 0.94);
    transition: var(--transition);
    position: relative;
}

.theme-switch__container::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    box-shadow: 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset;
    border-radius: var(--container-radius);
}

.theme-switch__checkbox {
    display: none;
}

.theme-switch__circle-container {
    width: var(--circle-container-diameter);
    height: var(--circle-container-diameter);
    background-color: rgba(255, 255, 255, 0.1);
    position: absolute;
    left: var(--circle-container-offset);
    top: var(--circle-container-offset);
    border-radius: var(--container-radius);
    box-shadow: inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), 0 0 0 0.625em rgba(255, 255, 255, 0.1), 0 0 0 1.25em rgba(255, 255, 255, 0.1);
    display: flex;
    transition: var(--circle-transition);
    pointer-events: none;
}

.theme-switch__sun-moon-container {
    pointer-events: auto;
    position: relative;
    z-index: 2;
    width: var(--sun-moon-diameter);
    height: var(--sun-moon-diameter);
    margin: auto;
    border-radius: var(--container-radius);
    background-color: var(--sun-bg);
    box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #a1872a inset;
    filter: drop-shadow(0.062em 0.125em 0.125em rgba(0, 0, 0, 0.25));
    overflow: hidden;
    transition: var(--transition);
}

.theme-switch__moon {
    transform: translateX(100%);
    width: 100%;
    height: 100%;
    background-color: var(--moon-bg);
    border-radius: inherit;
    box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #969696 inset;
    transition: var(--transition);
    position: relative;
}

.theme-switch__spot {
    position: absolute;
    top: 0.75em;
    left: 0.312em;
    width: 0.75em;
    height: 0.75em;
    border-radius: var(--container-radius);
    background-color: var(--spot-color);
    box-shadow: 0em 0.0312em 0.062em rgba(0, 0, 0, 0.25) inset;
}

.theme-switch__spot:nth-of-type(2) {
    width: 0.375em;
    height: 0.375em;
    top: 0.937em;
    left: 1.375em;
}

.theme-switch__spot:nth-last-of-type(3) {
    width: 0.25em;
    height: 0.25em;
    top: 0.312em;
    left: 0.812em;
}

.theme-switch__clouds {
    width: 1.25em;
    height: 1.25em;
    background-color: var(--clouds-color);
    border-radius: var(--container-radius);
    position: absolute;
    bottom: -0.625em;
    left: 0.312em;
    box-shadow: 0.937em 0.312em var(--clouds-color), -0.312em -0.312em var(--back-clouds-color), 1.437em 0.375em var(--clouds-color), 0.5em -0.125em var(--back-clouds-color), 2.187em 0 var(--clouds-color), 1.25em -0.062em var(--back-clouds-color), 2.937em 0.312em var(--clouds-color), 2em -0.312em var(--back-clouds-color), 3.625em -0.062em var(--clouds-color), 2.625em 0em var(--back-clouds-color), 4.5em -0.312em var(--clouds-color), 3.375em -0.437em var(--back-clouds-color), 4.625em -1.75em 0 0.437em var(--clouds-color), 4em -0.625em var(--back-clouds-color), 4.125em -2.125em 0 0.437em var(--back-clouds-color);
    transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
}

.theme-switch__stars-container {
    position: absolute;
    color: var(--stars-color);
    top: -100%;
    left: 0.312em;
    width: 2.75em;
    height: auto;
    transition: var(--transition);
}

/* Checked (Dark) States */
.theme-switch__checkbox:checked + .theme-switch__container {
    background-color: var(--container-night-bg);
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__circle-container {
    left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter));
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__circle-container:hover {
    left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter) - 0.187em);
}

.theme-switch__circle-container:hover {
    left: calc(var(--circle-container-offset) + 0.187em);
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__moon {
    transform: translate(0);
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__clouds {
    bottom: -4.062em;
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__stars-container {
    top: 50%;
    transform: translateY(-50%);
}

.header-user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: 50px;
    background: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
}

.header-user-pill:hover { background: rgba(59,91,219,0.12); }

.header-user-pill .avatar-sm {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
}

.header-user-pill .user-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--primary);
}

/* ============================================
   PAGE CONTENT
   ============================================ */
.page-content {
    flex: 1;
    padding: 24px;
    background: var(--bg-primary);
    min-height: calc(100vh - 64px);
    transition: background 0.3s ease;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.page-header .subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 4px 0 0;
}

/* ============================================
   HERO SECTION (ToDoBura style)
   ============================================ */
.hero-section {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.hero-section h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 6px;
    letter-spacing: -0.5px;
}

.hero-section .hero-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section p {
    font-size: 15px;
    color: var(--text-muted);
    margin: 0;
}

.hero-date {
    text-align: right;
    flex-shrink: 0;
}

.hero-date .today-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.hero-date .today-date {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

@media (max-width: 640px) {
    .hero-section { flex-direction: column; align-items: flex-start; gap: 8px; }
    .hero-section h1 { font-size: 24px; }
    .hero-date { text-align: left; }
}

/* ============================================
   STAT CARDS (White bg + colored icon)
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stats-grid.stats-grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1200px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } .stats-grid.stats-grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .stats-grid, .stats-grid.stats-grid-5 { grid-template-columns: 1fr; } }

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    transition: all 0.25s cubic-bezier(.4,0,.2,1);
    cursor: default;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--shadow-color);
}

.stat-card .stat-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.08;
    pointer-events: none;
}

.stat-card .stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.stat-card:hover .stat-icon { transform: scale(1.1); }

.stat-card.indigo .stat-icon { background: rgba(59,91,219,0.12); color: #3b5bdb; }
.stat-card.blue .stat-icon { background: rgba(59,130,246,0.12); color: #3b82f6; }
.stat-card.cyan .stat-icon { background: rgba(6,182,212,0.12); color: #06b6d4; }
.stat-card.emerald .stat-icon { background: rgba(16,185,129,0.12); color: #10b981; }
.stat-card.amber .stat-icon { background: rgba(245,158,11,0.12); color: #f59e0b; }
.stat-card.danger .stat-icon { background: rgba(239,68,68,0.12); color: #ef4444; }

.stat-card:hover.indigo { border-color: #3b5bdb; }
.stat-card:hover.blue { border-color: #3b82f6; }
.stat-card:hover.cyan { border-color: #06b6d4; }
.stat-card:hover.emerald { border-color: #10b981; }
.stat-card:hover.amber { border-color: #f59e0b; }
.stat-card:hover.danger { border-color: #ef4444; }

.stat-card .stat-content {
    flex: 1;
}

.stat-card .stat-value {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat-card .stat-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

.stat-card .stat-badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ============================================
   SECTION TITLE
   ============================================ */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 20px;
}

.section-title i {
    font-size: 1.3rem;
    color: #f59e0b;
}

/* ============================================
   QUICK ACTIONS (Horizontal card style)
   ============================================ */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

@media (max-width: 1200px) { .quick-actions-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .quick-actions-grid { grid-template-columns: 1fr; } }

.quick-action {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none !important;
    border: 1px solid var(--border-color);
    transition: all 0.25s cubic-bezier(.4,0,.2,1);
    cursor: pointer;
}

.quick-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.quick-action:hover.indigo { border-color: #3b5bdb; }
.quick-action:hover.blue { border-color: #3b82f6; }
.quick-action:hover.emerald { border-color: #10b981; }
.quick-action:hover.amber { border-color: #f59e0b; }

.quick-action .action-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.action-icon.icon-indigo { background: rgba(59,91,219,0.12); color: #3b5bdb; }
.action-icon.icon-blue { background: rgba(59,130,246,0.12); color: #3b82f6; }
.action-icon.icon-emerald { background: rgba(16,185,129,0.12); color: #10b981; }
.action-icon.icon-amber { background: rgba(245,158,11,0.12); color: #f59e0b; }

.quick-action .action-content {
    flex: 1;
    min-width: 0;
}

.quick-action .action-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 2px;
}

.quick-action .action-desc {
    font-size: 13px;
    color: var(--text-secondary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-action .action-arrow {
    color: var(--text-muted);
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.quick-action:hover .action-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* ============================================
   CARD / TABLE / FORM CONTAINERS
   ============================================ */
.card-container, .table-container, .form-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.25s;
}

.card-container:hover, .table-container:hover, .form-container:hover {
    box-shadow: 0 4px 20px var(--shadow-color);
}

/* ============================================
   TABLE
   ============================================ */
.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.table-header h6 {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-header h6 i { color: var(--primary); font-size: 1.2rem; }

.view-all-btn {
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.view-all-btn:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.table-container .table { margin-bottom: 0; }

.table-container .table thead th {
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    padding: 10px 24px;
}

.table-container .table tbody td {
    padding: 14px 24px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-primary);
    background: transparent;
    transition: background 0.2s ease;
}

.table-container .table tbody tr {
    transition: var(--transition);
}

.table-container .table tbody tr:hover td {
    background-color: var(--primary-light);
}

.table-container .table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   BADGES
   ============================================ */
.badge-status {
    padding: 5px 14px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.3px;
}

.badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.72rem;
}

/* ============================================
   FORM
   ============================================ */
.form-container {
    padding: 2rem;
}

.form-control, .form-select {
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    font-size: 14px;
    transition: var(--transition);
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

.form-control:hover, .form-select:hover {
    border-color: var(--text-muted);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,91,219,0.15);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.form-label {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    padding: 24px 0 8px;
}

.form-actions .btn-lg {
    padding: 10px 28px;
    font-size: 15px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 18px;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent-gradient);
    border: none;
    color: #fff;
    box-shadow: 0 2px 8px rgba(59,91,219,0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #364fc7 0%, #5f3dc4 100%);
    box-shadow: 0 4px 16px rgba(59,91,219,0.45);
    transform: translateY(-1px);
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-secondary);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.btn-outline-success { border-color: var(--success); color: var(--success); }
.btn-outline-success:hover { background: var(--success); border-color: var(--success); color: #fff; }

.btn-outline-danger { border-color: var(--danger); color: var(--danger); }
.btn-outline-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }

.btn:focus, .btn:active:focus {
    box-shadow: 0 0 0 3px rgba(59,91,219,0.25) !important;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

.empty-state p { font-size: 14px; margin: 0 0 1rem; }

/* ============================================
   ALERTS
   ============================================ */
.alert {
    border-radius: var(--radius-md);
    border: none;
    font-weight: 500;
    font-size: 14px;
    padding: 14px 18px;
}

.alert-success {
    background: rgba(16,185,129,0.1);
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: rgba(239,68,68,0.1);
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

:root.dark-theme .alert-success { color: #6ee7b7; }
:root.dark-theme .alert-danger { color: #fca5a5; }

/* ============================================
   TABS
   ============================================ */
.nav-tabs {
    border-bottom: 2px solid var(--border-color);
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    padding: 12px 20px;
    margin-bottom: -2px;
    transition: var(--transition);
    border-radius: 0;
    background: transparent;
}

.nav-tabs .nav-link:hover {
    color: var(--primary);
    border-bottom-color: rgba(59,91,219,0.3);
    background: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: transparent;
}

/* ============================================
   MODALS
   ============================================ */
.modal-content {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    background: var(--bg-card);
    color: var(--text-primary);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
}

.modal-header .modal-title { font-weight: 700; }
.modal-body { padding: 24px; }
.modal-footer { border-top: 1px solid var(--border-color); padding: 16px 24px; }

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ============================================
   LINKS
   ============================================ */
a.text-decoration-none.fw-medium {
    color: var(--primary);
    transition: var(--transition);
}

a.text-decoration-none.fw-medium:hover {
    color: var(--primary-hover);
}

/* ============================================
   TABLE DANGER
   ============================================ */
.table-danger td { background-color: rgba(239,68,68,0.06) !important; }
.table-danger:hover td { background-color: rgba(239,68,68,0.12) !important; }

/* ============================================
   RECENT ITEMS
   ============================================ */
.recent-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 900px) { .recent-section { grid-template-columns: 1fr; } }

.recent-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.25s;
}

.recent-card:hover {
    box-shadow: 0 4px 20px var(--shadow-color);
}

.recent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.recent-header h6 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.recent-header h6 i {
    font-size: 1.2rem;
    color: var(--primary);
}

.recent-list {
    padding: 8px;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.recent-item:hover { background: var(--bg-hover); }

.recent-item .item-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.recent-item .item-info {
    flex: 1;
    min-width: 0;
}

.recent-item .item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-item .item-meta {
    font-size: 13px;
    color: var(--text-secondary);
    display: block;
}

.recent-item .item-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.item-status.active {
    background: #dcfce7;
    color: #166534;
}

.item-status.inactive {
    background: #fee2e2;
    color: #991b1b;
}

:root.dark-theme .item-status.active {
    background: rgba(16,185,129,0.15);
    color: #6ee7b7;
}

:root.dark-theme .item-status.inactive {
    background: rgba(239,68,68,0.15);
    color: #fca5a5;
}

/* ============================================
   SEARCH BOX
   ============================================ */
.search-box {
    position: relative;
}

.search-box input {
    padding-left: 36px !important;
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 50px !important;
    font-size: 13px !important;
    height: 38px;
    width: 220px;
    transition: var(--transition);
    color: var(--text-primary) !important;
}

.search-box input:focus {
    width: 280px;
    background: var(--bg-secondary) !important;
    border-color: var(--primary) !important;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-section { animation: fadeInUp 0.4s ease-out both; }

.stat-card { animation: fadeInUp 0.5s ease-out both; }
.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

.quick-action { animation: fadeInUp 0.4s ease-out both; }
.quick-action:nth-child(1) { animation-delay: 0.1s; }
.quick-action:nth-child(2) { animation-delay: 0.15s; }
.quick-action:nth-child(3) { animation-delay: 0.2s; }
.quick-action:nth-child(4) { animation-delay: 0.25s; }

.table-container, .form-container, .card-container, .recent-card, .widget-card {
    animation: fadeInUp 0.4s ease-out 0.15s both;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .page-content { padding: 16px; }
    .top-header { padding: 0 16px; }
    .theme-switch { --toggle-size: 9px; }
    .main-grid, .recent-grid { grid-template-columns: 1fr; }
    .donut-layout { flex-direction: column; }
    .chart-bars { height: 120px; }
}

/* ============================================
   BTN GROUP
   ============================================ */
.btn-group-sm > .btn {
    padding: 6px 14px;
    font-size: 12px;
}

/* Main Grid (Dashboard) */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 900px) { .main-grid { grid-template-columns: 1fr; } }

.recent-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) { .recent-grid { grid-template-columns: 1fr; } }

/* Card Header */
.card-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header-custom h6 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.card-header-custom .view-all {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.card-header-custom .view-all:hover { text-decoration: underline; }

/* ============================================
   WIDGET CARDS (Dashboard 2x2 grid)
   ============================================ */
.widget-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.25s;
}

.widget-card + .widget-card {
    margin-top: 20px;
}

.main-grid > .widget-card + .widget-card,
.recent-grid > .widget-card + .widget-card {
    margin-top: 0;
}

.widget-card:hover {
    box-shadow: 0 4px 20px var(--shadow-color);
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.widget-header h6 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.widget-header h6 i { color: var(--primary); font-size: 1.2rem; }

.widget-body {
    padding: 20px;
}

/* ============================================
   DONUT CHART
   ============================================ */
.donut-layout {
    display: flex;
    align-items: center;
    gap: 24px;
}

@media (max-width: 480px) {
    .donut-layout { flex-direction: column; }
}

.donut-chart-container {
    flex-shrink: 0;
    width: 130px;
    height: 130px;
}

.donut-chart {
    width: 100%;
    height: 100%;
}

.donut-total {
    font-size: 26px;
    font-weight: 800;
    fill: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.donut-label-text {
    font-size: 10px;
    font-weight: 700;
    fill: var(--text-muted);
    letter-spacing: 1px;
    font-family: 'Inter', sans-serif;
}

.donut-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-name {
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
}

.legend-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* ============================================
   BAR CHART (Haftalık Verimlilik)
   ============================================ */
.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    height: 160px;
    padding-top: 8px;
}

.chart-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
}

.bar-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.chart-bar-track {
    flex: 1;
    width: 100%;
    max-width: 36px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.chart-bar-fill {
    width: 100%;
    background: linear-gradient(180deg, #3b5bdb, #5f3dc4);
    border-radius: 6px;
    min-height: 4px;
    transition: height 0.6s cubic-bezier(.4,0,.2,1);
}

.chart-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* Grouped Bar Chart */
.chart-bars-grouped {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    height: 160px;
    padding-top: 8px;
}

.chart-bar-group {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 100%;
    position: relative;
}

.chart-bar-group .chart-bar-wrapper {
    flex: 1;
}

.chart-bar-group .chart-bar-track {
    max-width: 24px;
}

.chart-bar-group > .chart-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 11px;
}

.chart-bars-grouped + .chart-legend,
.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Report Table */
.report-table {
    width: 100%;
    border-collapse: collapse;
}

.report-table thead tr {
    background: var(--bg-tertiary);
    border-bottom: 2px solid var(--border-color);
}

.report-table th {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.report-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
    vertical-align: middle;
}

.report-table tbody tr:hover {
    background: var(--primary-light);
}

.report-table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   CONTRACT PROGRESS
   ============================================ */
.contract-progress-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contract-row {
    cursor: default;
}

.contract-row-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.contract-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.contract-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contract-tasks {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.contract-pct {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    min-width: 36px;
    text-align: right;
}

.contract-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.contract-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(.4,0,.2,1);
}

/* ============================================
   DEADLINE LIST
   ============================================ */
.deadline-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.deadline-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.deadline-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dl-indicator {
    width: 4px;
    height: 36px;
    border-radius: 2px;
    flex-shrink: 0;
}

.dl-info {
    flex: 1;
    min-width: 0;
}

.dl-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dl-customer {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.dl-date {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================
   RECENT ITEMS (completion)
   ============================================ */
.recent-list {
    padding: 0;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.recent-item:last-child { border-bottom: none; }
.recent-item:hover { background: var(--bg-hover); }

.recent-item .item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.recent-item .item-info {
    flex: 1;
    min-width: 0;
}

.recent-item .item-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-item .item-meta {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.recent-item .item-status {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.item-status.active {
    background: rgba(16,185,129,0.12);
    color: #10b981;
}

.item-status.inactive {
    background: rgba(239,68,68,0.12);
    color: #ef4444;
}

:root.dark-theme .item-status.active {
    background: rgba(16,185,129,0.18);
    color: #6ee7b7;
}

:root.dark-theme .item-status.inactive {
    background: rgba(239,68,68,0.18);
    color: #fca5a5;
}

/* ============================================
   LIST CARDS (ToDoBura-style row cards)
   ============================================ */
.list-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.list-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    transition: all 0.2s ease;
    cursor: default;
    animation: fadeInUp 0.35s ease-out both;
}

.list-row:hover {
    box-shadow: 0 4px 20px var(--shadow-color);
    border-color: rgba(59,91,219,0.3);
}

.list-row.completed {
    opacity: 0.55;
}

.list-row.overdue {
    border-color: rgba(239,68,68,0.25);
}

.list-row.overdue:hover {
    border-color: rgba(239,68,68,0.5);
}

.list-row-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.list-row-body {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.list-row-top {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.list-row-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.2px;
    display: block;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-row-title:hover {
    color: var(--primary);
}

.list-row-title.done {
    text-decoration: line-through;
    color: var(--text-muted);
}

.list-row-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.list-row-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.list-row-meta span {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.list-row-meta i {
    font-size: 0.75rem;
}

.list-row-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.list-row:hover .list-row-actions {
    opacity: 1;
}

.btn-icon-sm {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.btn-icon-sm:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* Progress bar in list rows */
.list-row-progress {
    margin-top: 10px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.progress-track {
    height: 5px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(.4,0,.2,1);
}

/* Check button (task toggle) */
.check-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    color: white;
    font-size: 0.75rem;
    padding: 0;
}

.check-btn:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

.check-btn.checked {
    background: #10b981;
    border-color: #10b981;
}

/* Badge variants */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.badge-success { background: rgba(16,185,129,0.1); color: #10b981; }
.badge-danger { background: rgba(239,68,68,0.1); color: #ef4444; }
.badge-warning { background: rgba(245,158,11,0.1); color: #f59e0b; }
.badge-info { background: rgba(59,130,246,0.1); color: #3b82f6; }
.badge-primary { background: rgba(59,91,219,0.1); color: #3b5bdb; }
.badge-progress { background: rgba(59,130,246,0.1); color: #3b82f6; }
.badge-muted { background: var(--bg-tertiary); color: var(--text-secondary); }

/* Filter bar */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0 14px;
    flex: 1;
    min-width: 200px;
    transition: all 0.2s;
}

.filter-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,91,219,0.12);
}

.filter-search i {
    color: var(--text-muted);
    flex-shrink: 0;
    font-size: 0.9rem;
}

.filter-search input {
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    padding: 10px 0;
    width: 100%;
    outline: none;
}

.filter-search input::placeholder {
    color: var(--text-muted);
}

/* Filter chips */
.filter-chips {
    display: flex;
    gap: 6px;
}

.filter-chip {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-chip.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #fff;
}

/* Empty state page */
.empty-state-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-page i {
    font-size: 3.5rem;
    opacity: 0.3;
    margin-bottom: 16px;
}

.empty-state-page h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.empty-state-page p {
    font-size: 14px;
    margin: 0;
}

@media (max-width: 768px) {
    .list-row {
        flex-wrap: wrap;
        padding: 14px;
    }
    .list-row-actions {
        opacity: 1;
        width: 100%;
        justify-content: flex-end;
        padding-top: 8px;
        border-top: 1px solid var(--border-color);
        margin-top: 8px;
    }
    .filter-bar { flex-direction: column; }
}

/* ============================================
   3-COLUMN WIDGET GRID
   ============================================ */
.main-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 1200px) {
    .main-grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .main-grid-3 { grid-template-columns: 1fr; }
}

/* ============================================
   REVENUE WIDGET
   ============================================ */
.revenue-stats {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.revenue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.revenue-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.revenue-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.revenue-bar-section {
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.revenue-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

/* ============================================
   WORKLOAD WIDGET
   ============================================ */
.workload-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.workload-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wl-user {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.wl-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.wl-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}

.wl-bar-area {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wl-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 20px;
    text-align: right;
}

.progress-track {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-track.progress-sm {
    height: 6px;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
    background: var(--accent-gradient);
}

/* ============================================
   CALENDAR WIDGET
   ============================================ */
.calendar-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.calendar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.calendar-row:hover {
    background: var(--bg-hover);
}

.cal-date-badge {
    padding: 4px 10px;
    border: 2px solid;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    min-width: 60px;
    text-align: center;
}

.cal-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.cal-count {
    font-size: 13px;
    font-weight: 600;
}

.cal-tasks {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   NOTIFICATION STRIP (Dashboard)
   ============================================ */
.notification-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.notif-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.notif-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.notif-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notif-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.notif-msg {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================
   NOTIFICATION DROPDOWN (Header Bell Popup)
   ============================================ */
.notif-dropdown-wrap {
    position: relative;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    z-index: 1000;
    overflow: hidden;
    animation: fadeInUp 0.18s ease-out both;
}

.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.notif-dropdown-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.notif-dropdown-title i { color: var(--primary); }

.notif-dropdown-all {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.notif-dropdown-all:hover { text-decoration: underline; }

.notif-dropdown-body {
    max-height: 340px;
    overflow-y: auto;
}

.notif-dropdown-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--text-muted);
}

.notif-dropdown-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    color: var(--text-muted);
    font-size: 13px;
    gap: 8px;
}

.notif-dropdown-empty i { font-size: 2rem; opacity: 0.4; }

.notif-drop-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
    cursor: default;
}

.notif-drop-item:last-child { border-bottom: none; }

.notif-drop-item:hover { background: var(--bg-hover); }

.notif-drop-item.unread {
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
}

.notif-drop-item.unread:hover { background: rgba(59,91,219,0.1); }

.notif-drop-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    background: var(--primary-light);
    color: var(--primary);
}

.notif-drop-icon.danger { background: rgba(239,68,68,0.1); color: #ef4444; }
.notif-drop-icon.warning { background: rgba(245,158,11,0.1); color: #f59e0b; }
.notif-drop-icon.success { background: rgba(16,185,129,0.1); color: #10b981; }

.notif-drop-content { flex: 1; min-width: 0; }

.notif-drop-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-drop-msg {
    font-size: 12px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-drop-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.notif-dropdown-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.notif-mark-all-btn {
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.notif-mark-all-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spin { animation: spin 0.8s linear infinite; display: inline-block; }

/* ============================================
   DARK THEME — CONTRAST FIXES
   ============================================ */
:root.dark-theme .form-control,
:root.dark-theme .form-select {
    background-color: #1e293b;
    color: #f1f5f9;
    border-color: #334155;
}

:root.dark-theme .form-control::placeholder {
    color: #64748b;
}

:root.dark-theme .form-control:focus,
:root.dark-theme .form-select:focus {
    background-color: #273549;
    color: #f1f5f9;
    border-color: var(--primary);
}

:root.dark-theme .form-label {
    color: #94a3b8;
}

:root.dark-theme .form-select option {
    background: #1e293b;
    color: #f1f5f9;
}

:root.dark-theme .table-container .table thead th {
    background-color: #273549;
    color: #94a3b8;
}

:root.dark-theme .table-container .table tbody td {
    color: #e2e8f0;
    border-color: #334155;
}

:root.dark-theme .table-container .table tbody tr:hover td {
    background-color: rgba(59,91,219,0.08);
}

:root.dark-theme .badge-muted {
    background: #334155;
    color: #94a3b8;
}

:root.dark-theme .filter-chip {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

:root.dark-theme .filter-chip:hover {
    border-color: var(--primary);
    color: #f1f5f9;
}

:root.dark-theme .btn-outline-secondary {
    border-color: #475569;
    color: #94a3b8;
}

:root.dark-theme .btn-outline-secondary:hover {
    background: #334155;
    color: #f1f5f9;
}

:root.dark-theme .btn-icon-sm {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

:root.dark-theme .btn-icon-sm:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(59,91,219,0.1);
}

:root.dark-theme .modal-content {
    background: #1e293b;
    border-color: #334155;
}

:root.dark-theme .modal-header,
:root.dark-theme .modal-footer {
    border-color: #334155;
}

:root.dark-theme .modal-title,
:root.dark-theme .modal-body {
    color: #f1f5f9;
}

:root.dark-theme .page-header h2 {
    color: #f1f5f9;
}

:root.dark-theme .section-title {
    color: #f1f5f9;
}

:root.dark-theme .list-row {
    background: #1e293b;
    border-color: #334155;
}

:root.dark-theme .list-row-title {
    color: #f1f5f9;
}

:root.dark-theme .list-row-desc,
:root.dark-theme .list-row-meta span {
    color: #94a3b8;
}

:root.dark-theme .recent-header h6,
:root.dark-theme .widget-header h6,
:root.dark-theme .table-header h6 {
    color: #f1f5f9;
}

:root.dark-theme .card-container,
:root.dark-theme .table-container,
:root.dark-theme .form-container,
:root.dark-theme .widget-card,
:root.dark-theme .recent-card {
    background: #1e293b;
    border-color: #334155;
}

:root.dark-theme .notif-dropdown {
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

:root.dark-theme .notif-dropdown-footer {
    background: #162032;
}

:root.dark-theme .notif-mark-all-btn {
    border-color: #475569;
    color: #94a3b8;
}

:root.dark-theme .header-user-pill {
    background: rgba(59,91,219,0.15);
}

:root.dark-theme .header-user-pill .user-name {
    color: #a5b4fc;
}

/* ============================================
   NOTIFICATION BELL (Header)
   ============================================ */
.notification-bell {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    border: 2px solid var(--bg-primary);
    animation: notifPulse 2s infinite;
}

@keyframes notifPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ============================================
   NOTIFICATION LIST (Page)
   ============================================ */
.notification-unread {
    border-left: 3px solid var(--primary) !important;
    background: var(--primary-light) !important;
}

.notification-read {
    opacity: 0.7;
}

.notification-read:hover {
    opacity: 1;
}

/* ============================================
   SECTION TITLE (with flex support for link)
   ============================================ */
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
}
