:root {

  /* Primary */
  --primary: #6366F1;
  --primary-hover: #4F46E5;
  --primary-light: #818CF8;

  /* Status */
  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #06B6D4;

  /* Background */
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-2: #F1F5F9;

  /* Text */
  --text: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;

  /* Border */
  --border: #E2E8F0;

  /* Shadow */
  --shadow: rgba(15, 23, 42, 0.08);

  /* Priority */
  --priority-high: #EF4444;
  --priority-medium: #F59E0B;
  --priority-low: #22C55E;

  /* Border Radius */
  --radius: 14px;

  /* Transition */
  --transition: .3s ease;
}

[data-theme="dark"] {

  /* Primary */
    --primary: #818CF8;
    --primary-hover: #6366F1;
    --primary-light: #A5B4FC;

  /* Status */
    --success: #22C55E;
    --warning: #FBBF24;
    --danger: #F87171;
    --info: #22D3EE;

  /* Background */
    --bg: #020617;
    --surface: #0F172A;
    --surface-2: #162033;

  /* Text */
    --text: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;

  /* Border */
    --border: #334155;

  /* Shadow */
    --shadow: rgba(0, 0, 0, 0.30);

  /* Priority */
    --priority-high: #F87171;
    --priority-medium: #FBBF24;
    --priority-low: #4ADE80;
}

*{
    margin: 0;
    padding: 0;
}

/* ================= SCROLLBAR ================= */

html{
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--surface-2);
}

::-webkit-scrollbar{
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track{
    background: var(--surface-2);
}

::-webkit-scrollbar-thumb{
    background: linear-gradient(180deg, var(--primary), var(--primary-hover));
    border-radius: 999px;
    border: 2px solid var(--surface-2);
}

::-webkit-scrollbar-thumb:hover{
    background: var(--primary-hover);
}

/* ================= ACCESSIBILITY ================= */

.sr-only{
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link{
    position: absolute;
    top: -60px;
    left: 12px;
    background: var(--primary);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    z-index: 999999;
    font-weight: 600;
    text-decoration: none;
    transition: top .2s ease;
}

.skip-link:focus{
    top: 12px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible{
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce){
    *,
    *::before,
    *::after{
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
html{
    overflow-x: clip;
    scroll-behavior:smooth;
}

body{
    font-family: Inter, sans-serif;
    background: var(--bg);
    color: var(--text);
    box-sizing:border-box;
    line-height:1.5;
}

*,
*::before,
*::after{
    box-sizing:border-box;
}

body,
header,
nav,
section,
.task-card,
button,
input,
select,
textarea,
.stats-card,
.chart-card,
.filters,
.modal,
.toast {
    transition:
        background-color .35s ease,
        color .35s ease,
        border-color .35s ease,
        box-shadow .35s ease;
}

/* ================= HEADER ================= */

.header{
    width:92%;
    max-width:1280px; 
    margin:20px auto;
    background:linear-gradient(90deg,#1F2340,#181C33);
    padding:18px 0;
    color:#fff;
    border-radius:22px;
    box-shadow:0 8px 30px rgba(0,0,0,.35);
    position:sticky;
    top:15px;
    z-index:9999;
}

.header-container{
    width:92%;
    max-width:1400px;
    margin:0 auto;
    display:flex;
    justify-content:space-between;
    align-items:center;
    position:relative;
}

.logo-container{
    display:flex;
    align-items:center;
    gap:18px;
    justify-self:start;
}

.logo-box{
    width:54px;
    height:54px;
    border-radius:14px;
    background:#6C63FF22;
    display:flex;
    justify-content:center;
    align-items:center;
    backdrop-filter:blur(10px);
}

.logo{
    width:34px;
}

.title-box h1{
    margin:0 0 2px;
    font-size:24px;
    font-weight:700;
    line-height:1.2;
}

.title-box p{
    margin:0;
    color:#9DA4C0;
    font-size:14px;
    line-height:1.2;
}

.header-right{
    display:flex;
    align-items:center;
    margin-left:auto;
}

.date-card{
    position:absolute;
    left:50%;
    transform:translateX(-50%);
    background:#232845;
    padding:14px 22px;
    border-radius:14px;
    border:1px solid rgba(255,255,255,.08);
    display:flex;
    align-items:center;
    justify-content:center;
    gap:12px;
    min-width:340px;
}

.date-info{
    display:flex;
    align-items:center;
    gap:10px;
    color:#fff;
    font-size:15px;
    font-weight:500;
}

.date-info .divider{
    opacity:.4;
}

.theme-toggle{
    width:48px;
    height:48px;
    border-radius:50%;
    border:none;
    background:#2E3356;
    color:#FFD54F;
    cursor:pointer;
    transition:.3s;
}

.theme-toggle:hover{
    transform:rotate(180deg);
}

/* ================= DASHBOARD ================= */

.cards-section{
    width:92%;
    max-width:1280px;
    margin:28px auto;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px; 
}

.card{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:18px;
    padding:22px;
    display:flex;
    align-items:center;
    gap:16px;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
    transition:.25s ease;
}

.card:hover{
    transform:translateY(-5px);
    box-shadow:0 14px 28px rgba(15,23,42,.12);
}

.card-icon{
    width:60px;
    height:60px;
    border-radius:16px;
    display:flex;
    justify-content:center;
    align-items:center;
    color:#fff;
    font-size:24px;
    flex-shrink:0;
}

.total-card .card-icon{
    background:#6366F1;
}

.completed-card .card-icon{
    background:#22C55E;
}

.pending-card .card-icon{
    background:#F59E0B;
}

.rate-card .card-icon{
    background:#06B6D4;
}

.card-info span{
    color:var(--text-secondary);
    font-size:15px;
    font-weight:600;
}

.rate-card h2{
    margin-bottom:6px;
    color:var(--primary);
    font-size:34px;
    font-weight:700;
}

.card-info small{
    color:var(--text-muted);
    font-size:13px;
}

/* ================= FORM ================= */

.form-section{
    width:92%;
    max-width:1280px;
    margin:40px auto;
    padding:32px;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:20px;
    box-shadow:0 10px 30px rgba(2,6,23,.06);
}

#taskForm{
    width:100%;
}

#taskForm .heading{
    margin-bottom:30px;
}

#taskForm .heading h2{
    font-size:30px;
    font-weight:700;
    color:var(--text);
    margin-bottom:6px;
}

#taskForm .heading p{
    font-size:18px;
    color:var(--text-secondary);
}

.form-row{
    display:grid;
    grid-template-columns:
        2fr
        2fr
        1.1fr
        1.2fr
        1.3fr
        180px;
    gap:18px;
    align-items:end;
}

.form-group{
    display:flex;
    flex-direction:column;
}

.form-group label{
    margin-bottom:8px;
    font-size:15px;
    font-weight:600;
    color:var(--text);
}

.form-group input,
.form-group select{
    width:100%;
    height:52px;
    padding:0 16px;
    border:1px solid var(--border);
    border-radius:12px;
    background:var(--surface-2);
    color:var(--text);
    transition:.3s;
}

#description{
    height:56px;
}

.form-group input:focus,
.form-group select:focus{
    outline:none;
    border-color:var(--primary);
    box-shadow:0 0 0 4px rgba(99,102,241,.15);
}

.submitBtn{
    width:100%;
    height:52px;
    border:none;
    border-radius:12px;
    background:linear-gradient(135deg,#6366F1,#4F46E5);
    color:#fff;
    font-size:16px;
    font-weight:600;
    cursor:pointer;
    display:flex;
    justify-content:center;
    align-items:center;
    margin: 0;
}

.submit-group{
    display: flex;
    flex-direction: column;
}


.submitBtn:hover{
    transform:translateY(-2px);
}

/* ================= TOOLBAR ================= */

.task-toolbar{
    width:92%;
    max-width:1280px;
    margin:40px auto;
    padding:22px;
    display:grid;
    grid-template-columns:
        2.5fr
        repeat(4,1fr);
    gap:18px;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:20px;
    box-shadow:0 10px 30px rgba(2,6,23,.06);
}

.search-box{
    display:flex;
    align-items:center;
    gap:12px;
    height:50px;
    padding:0 18px;
    border:1px solid var(--border);
    border-radius:12px;
    background:var(--surface-2);
}

.search-box i{
    color:var(--text-muted);
    font-size:15px;
}

.search-box input{
    flex:1;
    height:100%;
    border:none;
    outline:none;
    background:transparent;
    color:var(--text);
    font-size:15px;
}

.task-toolbar select{
    height:50px;
    border-radius:12px;
    border:1px solid var(--border);
    background:var(--surface-2);
    padding:0 16px;
}

.task-toolbar select:focus{
    outline:none;
    border-color:var(--primary);
    box-shadow:0 0 0 4px rgba(99,102,241,.15);
}

/* ================= TASKS ================= */


.card-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:18px;
}

.tasks-section{
    width:92%;
    max-width:1280px;
    margin:40px auto;
}

.tasks-section .heading{
    text-align:center;
    margin-bottom:35px;
}

.tasks-section .heading h2{
    font-size:34px;
    font-weight:700;
    color:var(--text);
    margin-bottom:8px;
}

.tasks-section .heading p{
    font-size:18px;
    color:var(--text-secondary);
}

#tasks-num{
    color:var(--primary);
    font-weight:700;
}

.tasks-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(330px,1fr));
    gap:22px;
}

.task-card{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:18px;
    padding:22px;
    display:flex;
    flex-direction:column;
    gap:18px;
    box-shadow:0 8px 20px rgba(15,23,42,.06);
    transition:.25s ease;
    overflow:hidden;
    position:relative;
}

.task-card.priority-high{
    border-left:4px solid #EF4444;
}

.task-card.priority-medium{
    border-left:4px solid #F59E0B;
}

.task-card.priority-low{
    border-left:4px solid #22C55E;
}

.task-card:hover{
    transform:translateY(-6px);
    box-shadow:0 18px 35px rgba(15,23,42,.12);
}

.card-top{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    margin-bottom:18px;
}

.task-title{
    display:flex;
    flex-direction:column;
    gap:4px;
    margin-bottom:10px;
}

.task-title h3{
    font-size:22px;
    font-weight:700;
    color:var(--text);
    margin:0;
}

.priority-badge{
    padding:6px 12px;
    border-radius:999px;
    font-size:12px;
    font-weight:600;
}

.priority-badge.high{
    background:#EF4444;
}

.priority-badge.medium{
    background:#F59E0B;
}

.priority-badge.low{
    background:#22C55E;
}

.priority-badge.badge-high{
    background:#EF4444;
}

.priority-badge.badge-medium{
    background:#F59E0B;
}

.priority-badge.badge-low{
    background:#22C55E;
}

.status-chip{
    padding:8px 16px;
    border-radius:999px;
    font-size:13px;
    font-weight:600;
}

.status-chip.completed{
    background:#DCFCE7;
    color:#15803D;
}

.status-chip.pending{
    background:#FEF3C7;
    color:#B45309;
}

.task-description{
    color:var(--text-secondary);
    font-size:15px;
    line-height:1.7;
    margin:0;
    min-height:50px;
}

.task-meta{
    display:flex;
    justify-content:space-between;
    align-items:center;
    font-size:14px;
    color:var(--text-muted);
    border-top:1px solid var(--border);
    padding-top:16px;
}

.task-meta span{
    display:flex;
    align-items:center;
    gap:8px;
}

.card-actions{
    margin-top:auto;
    display:flex;
    justify-content:flex-end;
    gap:10px;
    padding-top:18px;
    border-top:1px solid var(--border);
}

.card-actions button{
    height:40px;
    padding:0 18px;
    border:none;
    border-radius:10px;
    color:#fff;
    cursor:pointer;
    font-size:13px;
    font-weight:600;
    transition:.25s;
}

.complete-btn{
    min-width:120px;
    color:#fff;
    transition:.3s;
}

.completed-btn{
    background:#22C55E;
}

.completed-btn:hover{
    background:#16A34A;
}

.pending-btn{
    background:#F59E0B;
}

.pending-btn:hover{
    background:#D97706;
}

.edit-btn{
    background:#3B82F6;
    width:42px;
    height:42px;
    padding:0;
    display:flex;
    justify-content:center;
    align-items:center;
    flex-shrink:0;
}

.delete-btn{
    background:#EF4444;
    width:42px;
    height:42px;
    padding:0;
    display:flex;
    justify-content:center;
    align-items:center;
    flex-shrink:0;
}

.card-actions button:hover{
    transform:translateY(-3px);
    filter: brightness(1.08);
}

.card-actions button i{
    margin: 0;
    line-height: 1;
}

/* ================= CHART ================= */

.chart-section{
    width:92%;
    max-width:1280px;
    margin:40px auto;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:20px;
    padding:28px;
    box-shadow:0 10px 30px rgba(15,23,42,.06);
}

.chart-header{
    margin-bottom:30px;
}

.chart-header h2{
    font-size:32px;
    font-weight:700;
    color:var(--text);
    margin-bottom:8px;
}

.chart-header p{
    font-size:18px;
    color:var(--text-secondary);
}

.chart-wrapper{
    width:260px;
    height:260px;
    margin:0 auto;
    display:flex;
    justify-content:center;
    align-items:center;
}

.chart-wrapper canvas{
    width:100% !important;
    height:100% !important;
}

/* ================= EXPORT & AI ================= */

.export-actions{
    width:min(1200px,92%);
    margin:25px auto;
    display:flex;
    justify-content:flex-end;
    gap:16px;
}

.export-actions button{
    height:56px;
    padding:0 28px;
    border:none;
    border-radius:18px;
    color:#fff;
    font-size:17px;
    font-weight:700;
    cursor:pointer;
    display:flex;
    align-items:center;
    gap:12px;
    position:relative;
    overflow:hidden;
    transition:.35s;
}

.export-actions button:hover{
    transform:translateY(-4px) scale(1.03);
}

#exportCSV{
    background:#18C37E;
    box-shadow:0 10px 30px rgba(24,195,126,.35);
}


.ai-btn{
    background:linear-gradient(
        135deg,
        #8B5CF6,
        #6366F1,
        #3B82F6
    );
    box-shadow:
        0 12px 35px rgba(99,102,241,.45),
        0 0 25px rgba(168,85,247,.35);
}

.ai-btn i{
    font-size:20px;
}

.ai-btn::before{
    content:"";
    position:absolute;
    inset:-40%;
    background:
        radial-gradient(circle,#fff 2px,transparent 3px);
    background-size:30px 30px;
    opacity:.35;
    animation:sparkles 7s linear infinite;
    pointer-events:none;
}

.ai-btn::after{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(
        120deg,
        transparent 20%,
        rgba(255,255,255,.45),
        transparent 80%
    );
    transform:translateX(-120%);
    transition:.6s;
}

.ai-btn:hover::after{
    transform:translateX(120%);
}

.ai-btn{
    position:relative;
}

.ai-tooltip{
    position:absolute;
    bottom:125%;
    left:50%;
    transform:translateX(-50%) translateY(10px);

    background:#111827;
    color:#fff;

    padding:12px 16px;

    border-radius:12px;

    font-size:13px;

    white-space:nowrap;

    opacity:0;
    visibility:hidden;

    transition:.35s;

    box-shadow:0 10px 25px rgba(0,0,0,.25);

    pointer-events:none;
}

.ai-tooltip::after{
    content:"";
    position:absolute;
    top:100%;
    left:50%;
    transform:translateX(-50%);

    border:8px solid transparent;
    border-top-color:#111827;
}

.ai-btn:hover .ai-tooltip{
    opacity:1;
    visibility:visible;
    transform:translateX(-50%) translateY(0);
}






















[data-theme="dark"] .status-chip.completed{
    background:#14532D;
    color:#BBF7D0;
}

[data-theme="dark"] .status-chip.pending{
    background:#78350F;
    color:#FDE68A;
}

[data-theme="dark"] select{
    color: #fff;
}

[data-theme="dark"] option{
    background: #1E293B;
    color: #fff;
}

.no-tasks{
    grid-column:1 / -1;
    width:100%;
    min-height:320px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    padding:40px;
    color:var(--text-secondary);
}

.no-tasks i{
    font-size:60px;
    color:var(--primary);
    margin-bottom:18px;
}

.no-tasks h3{
    color:var(--text);
    margin-bottom:10px;
}

.no-tasks p{
    color:var(--text-secondary);
}


.modal-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    display:flex;
    justify-content:center;
    align-items:center;
    opacity:0;
    visibility:hidden;
    transition:.3s;
}

.modal-overlay.show{
    opacity:1;
    visibility:visible;
}

.modal{
    background:var(--surface);
    color:var(--text);
    padding:30px;
    border-radius:20px;
    width:400px;
    max-width:90%;
    transform:scale(.8);
    transition:.3s;
}

.modal-overlay.show .modal{
    transform:scale(1);
}

.modal-actions{
    margin-top:25px;
    display:flex;
    justify-content:flex-end;
    gap:10px;
}

.cancel-btn,
.confirm-btn{
    border:none;
    padding:12px 20px;
    border-radius:10px;
    cursor:pointer;
}

.cancel-btn{
    background:#CBD5E1;
}

.confirm-btn{
    background:#EF4444;
    color:#fff;
}

.tasks-section .heading{
    display:flex;
    justify-content:space-between;
    align-items:end;
    margin-bottom:30px;
}

.tasks-section .heading h2{
    font-size:32px;
    font-weight:700;
}

.tasks-section .heading p{
    font-size:16px;
    color:var(--text-secondary);
}

#tasks-num{
    color:var(--primary);
    font-weight:bold;
}

.payment-text{
    text-align:center;
    font-size:17px;
    line-height:1.7;
    margin-top:15px;
}

.payment-text strong{
    color:#22C55E;
    font-size:28px;
}

.fake-card{
    margin:25px auto;
    width:100%;
    height:95px;
    border-radius:18px;
    background:linear-gradient(135deg,#312E81,#4F46E5,#7C3AED);
    color:white;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:12px;
    font-size:22px;
    font-weight:600;
    box-shadow:0 12px 25px rgba(79,70,229,.35);
}

.fake-card i{
    font-size:28px;
}

.confirm-btn.loading{
    pointer-events:none;
    opacity:.8;
    cursor:not-allowed;
}

.payment-status{
    text-align:center;
    font-weight:600;
    color:var(--primary);
    min-height:25px;
    margin:15px 0;
}

/* ================= SELECT FIX ================= */

select{
    color: var(--text);
}

option{
    color: #000;
}


/* ================= TOAST ================= */

#toast{
    position:fixed;
    top:25px;
    right:25px;
    min-width:320px;
    background:var(--surface);
    color:var(--text);
    border-radius:16px;
    padding:16px 20px;
    box-shadow:0 15px 40px rgba(0,0,0,.15);
    display:flex;
    flex-direction:column;
    gap:12px;
    overflow:hidden;
    transform:translateX(120%);
    opacity:0;
    transition:.35s ease;
    z-index:9999;
}

#toast.show{
    transform:translateX(0);
    opacity:1;
}

.toast-content{
    display:flex;
    align-items:center;
    gap:12px;
    font-weight:600;
    font-size:15px;
}

.toast-content i{
    font-size:22px;
}

/* Success */
#toast.success .toast-content i{
    color:var(--success);
}

/* Error */
#toast.error .toast-content i{
    color:var(--danger);
}

/* Info */
#toast.info .toast-content i{
    color:var(--info);
}

.toast-progress{
    height:4px;
    width:100%;
    background:var(--primary);
    border-radius:10px;
    transform-origin:left;
    transform:scaleX(1);
}

#toast.success .toast-progress{
    background:var(--success);
}

#toast.error .toast-progress{
    background:var(--danger);
}

#toast.info .toast-progress{
    background:var(--info);
}

/*  */
.form-group input:hover,
.form-group select:hover,
.search-box:hover,
.task-toolbar select:hover{
    border-color:var(--primary);
}


.progress-bar{
    width:100%;
    height:10px;
    background:rgba(255,255,255,.08);
    border:1px solid var(--border);
    border-radius:999px;
    overflow:hidden;
    margin:14px 0;
    position:relative;
}

.progress-fill{
    width:0;
    height:100%;
    border-radius:999px;
    background:linear-gradient(
        90deg,
        #6D5DF6 0%,
        #7C4DFF 50%,
        #9F67FF 100%
    );
    box-shadow:0 0 15px rgba(109,93,246,.45);
    transition:width .6s ease;
}

.progress-fill::after{
    content:"";
    position:absolute;
    top:0;
    left:-40%;
    width:40%;
    height:100%;
    background:rgba(255,255,255,.25);
    transform:skewX(-25deg);
    animation:progressShine 2.5s infinite;
}


/* ================= VALIDATION ================= */

.error-message{
    display: block;
    min-height: 18px;
    margin-top: 6px;
    color: var(--danger);
    font-size: 13px;
    font-weight: 500;
}

.form-group .error{
    border-color: var(--danger) !important;
}

.form-group .error:focus{
    box-shadow: 0 0 0 4px rgba(239,68,68,.15);
}


/* ================= Due tasks ================= */

.due-status{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    width: fit-content;
}

.due-status.overdue{
    background: #FEE2E2;
    color: #DC2626;
}

.due-status.today{
    background: #FEF3C7;
    color: #B45309;
}

.due-status.upcoming{
    background: #DBEAFE;
    color: #1D4ED8;
}

/* Dark Mode */

[data-theme="dark"] .due-status.overdue{
    background: #7F1D1D;
    color: #FECACA;
}

[data-theme="dark"] .due-status.today{
    background: #78350F;
    color: #FDE68A;
}

[data-theme="dark"] .due-status.upcoming{
    background: #1E3A8A;
    color: #BFDBFE;
}

[data-theme="dark"] .card,
[data-theme="dark"] .form-section,
[data-theme="dark"] .task-toolbar,
[data-theme="dark"] .chart-section,
[data-theme="dark"] .task-card{
    box-shadow:
        0 0 0 1px rgba(255,255,255,.04),
        0 18px 40px rgba(0,0,0,.45);
}

/* ================= easter egg ================= */
.dev-credit{
    position:fixed;
    bottom:15px;
    right:15px;
    background:#6366F1;
    color:#fff;
    padding:12px 18px;
    border-radius:12px;
    z-index:99999;
    font-weight:bold;
}


/* =============== Loading page =================== */

#loader{
    position: fixed;
    inset:0;
    z-index:99999999;
    display:flex;
    justify-content:center;
    align-items:center;
    background:#0f172a;
}

.loader-card{
    text-align:center;
    width:420px;
}

.loader-logo{
    width:80px;
    animation:spin 2s linear infinite;
}

.loader-card h2{
    color:white;
    margin:20px 0 10px;
    font-size:34px;
}

.loader-card p{
    color:#CBD5E1;
    margin-bottom:25px;
}

.loader-card small{
    display:block;
    margin-top:18px;
    color:#94A3B8;
}

.loader-bar{
    width:100%;
    height:10px;
    background:#1E293B;
    border-radius:999px;
    overflow:hidden;
}

.loader-progress{
    height:100%;
    width:0%;
    background:linear-gradient(90deg,#6366F1,#8B5CF6,#06B6D4);
    animation: loadingProgress 2.8s linear forwards;
}

.loader-hide{
    opacity:0;
    visibility:hidden;
    transition: 0.6s;
}

.loader-chart{
    width:110px;
    height:90px;
    margin:0 auto 25px;
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
}

.loader-chart span{
    width:16px;
    border-radius:10px 10px 0 0;
    background:linear-gradient(
        to top,
        #3B82F6,
        #6366F1,
        #8B5CF6
    );
    animation:bars 1s ease-in-out infinite;
}

.loader-chart span:nth-child(1){
    height:35px;
    animation-delay:0s;
}

.loader-chart span:nth-child(2){
    height:65px;
    animation-delay:.15s;
}

.loader-chart span:nth-child(3){
    height:50px;
    animation-delay:.3s;
}

.loader-chart span:nth-child(4){
    height:80px;
    animation-delay:.45s;
}

.loader-chart span:nth-child(5){
    height:40px;
    animation-delay:.6s;
}

@keyframes bars{
    0%,100%{
        transform:scaleY(.5);
    }
    50%{
        transform:scaleY(1.2);
    }
}

@keyframes loading{
    from{
        width:0;
    }
    to{
        width:100%;
    }
}

@keyframes spin{
    from{
        transform:rotate(0deg);
    }
    to{
        transform:rotate(360deg);
    }
}

@keyframes loadingProgress {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

/* ================= Footer ================= */

.footer{
    width:92%;
    max-width:1280px;
    margin:70px auto 25px;
    text-align:center;
    color:var(--text-muted);
    font-size:15px;
    border-top:1px solid var(--border);
    padding-top:25px;
}




@keyframes sparkles{
    from{
        background-position:0 0;
    }
    to{
        background-position:180px 120px;
    }
}


@keyframes progressShine{
    from{
        left:-40%;
    }
    to{
        left:140%;
    }
}


@keyframes toastProgress{
    from{
        transform:scaleX(1);
    }
    to{
        transform:scaleX(0);
    }
}

@keyframes taskAppear{
    from{
        opacity:0;
        transform:translateY(25px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}


@keyframes shake{
    0%{transform:translateX(0);}
    20%{transform:translateX(-5px);}
    40%{transform:translateX(5px);}
    60%{transform:translateX(-5px);}
    80%{transform:translateX(5px);}
    100%{transform:translateX(0);}
}

/* ==================================================
   RESPONSIVE DESIGN
   ================================================== */

/* ----- Large tablets / small laptops ----- */
@media (max-width: 1200px){
    .cards-section{
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row{
        grid-template-columns: repeat(2, 1fr);
    }

    .submit-group{
        grid-column: 1 / -1;
    }

    .task-toolbar{
        grid-template-columns: 1fr 1fr;
    }

    .search-box{
        grid-column: 1 / -1;
    }
}

/* ----- Tablets ----- */
@media (max-width: 900px){
    .header{
        top: 10px;
    }

    .header-container{
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .logo-container{
        justify-content: center;
    }

    .header-right{
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
        gap: 14px;
    }

    .date-card{
        position: static;
        transform: none;
        min-width: 0;
        flex: 1;
    }

    .chart-wrapper{
        width: 220px;
        height: 220px;
    }
}

/* ----- Mobile ----- */
@media (max-width: 768px){
    .header{
        width: 94%;
        border-radius: 18px;
        padding: 14px 0;
    }

    .logo-container{
        gap: 12px;
    }

    .logo-box{
        width: 44px;
        height: 44px;
    }

    .logo{
        width: 28px;
    }

    .title-box h1{
        font-size: 19px;
    }

    .title-box p{
        font-size: 12px;
    }

    .date-card{
        padding: 10px 14px;
        gap: 8px;
    }

    .date-info{
        font-size: 13px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .cards-section{
        grid-template-columns: 1fr;
        margin: 20px auto;
        gap: 14px;
    }

    .form-section,
    .task-toolbar,
    .chart-section{
        padding: 20px;
        width: 94%;
        margin: 24px auto;
    }

    #taskForm .heading h2,
    .chart-header h2{
        font-size: 24px;
    }

    #taskForm .heading p,
    .chart-header p{
        font-size: 15px;
    }

    .form-row{
        grid-template-columns: 1fr;
    }

    .submit-group{
        grid-column: auto;
    }

    .task-toolbar{
        grid-template-columns: 1fr;
    }

    .tasks-section{
        width: 94%;
    }

    .tasks-section .heading{
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .tasks-section .heading h2{
        font-size: 26px;
    }

    .tasks-grid{
        grid-template-columns: 1fr;
    }

    .export-actions{
        width: 94%;
        flex-direction: column;
    }

    .export-actions button{
        width: 100%;
        justify-content: center;
    }

    #toast{
        left: 16px;
        right: 16px;
        min-width: 0;
        top: 16px;
    }

    .modal{
        width: 92%;
        padding: 24px;
    }

    .footer{
        width: 94%;
    }
}

/* ----- Small phones ----- */
@media (max-width: 480px){
    .header-container{
        align-items: center;
    }

    .logo-container{
        justify-content: center;
        width: 100%;
        text-align: center;
    }

    .header-right{
        flex-direction: column;
    }

    .date-card{
        width: 100%;
    }

    .card{
        padding: 18px;
        gap: 12px;
    }

    .card-icon{
        width: 48px;
        height: 48px;
        font-size: 18px;
    }

    .rate-card h2{
        font-size: 26px;
    }

    .chart-wrapper{
        width: 190px;
        height: 190px;
    }

    .loader-card{
        width: 90%;
    }

    .loader-card h2{
        font-size: 26px;
    }

    .task-title h3{
        font-size: 19px;
    }

    .card-actions{
        flex-wrap: wrap;
    }

    .complete-btn{
        min-width: 0;
        flex: 1;
    }
}
