/* ==========================
   GLOBAL
========================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Segoe UI',sans-serif;
}

:root{
    --primary: rgb(148, 64, 227);
    --primary-dark:blueviolet;
    --background:#f5f7fb;
    --card:#ffffff;
    --text:#222;
    --gray:#777;
    --border:#e5e7eb;
    --danger:#ef4444;
    --card-bg: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body{
    background:var(--background);
    color:var(--text);
    min-height:100vh;
}

a{
    text-decoration:none;
}

img{
    display:block;
    max-width:100%;
}

/* ==========================
   APP LAYOUT
========================== */

.app{
    display:grid;
    grid-template-columns:260px 1fr;
    min-height:100vh;
}

/* ==========================
   SIDEBAR
========================== */

.sidebar{
    background:white;
    border-right:1px solid var(--border);
    padding:30px;
}

.sidebar h2{
    color:var(--primary);
    margin-bottom:30px;
}

.sidebar-brand{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:30px;
}

.sidebar-brand h2{
    color:var(--primary);
    margin-bottom:0;
}

.sidebar-logo{
    width:36px;
    height:36px;
    object-fit:contain;
    border-radius:8px;
}

.sidebar nav{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.sidebar a{
    padding:14px;
    border-radius:12px;
    color:#444;
    transition:.3s;
}

.sidebar a:hover,
.sidebar a.active{
    background:var(--primary);
    color:white;
}

/* ==========================
   REGISTER PAGE
========================== */

.register-container{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:20px;
}

.register-card{
    width:100%;
    max-width:600px;
    background:white;
    padding:40px;
    border-radius:20px;
    box-shadow:0 5px 20px rgba(0,0,0,.08);
}

.register-card h1{
    margin-bottom:10px;
}

.register-card p{
    color:var(--gray);
    margin-bottom:25px;
}

/* ==========================
   FORM ELEMENTS
========================== */

.form-group{
    margin-bottom:20px;
}

.form-group label{
    display:block;
    margin-bottom:8px;
    font-weight:600;
}

.form-group input,
.form-group textarea,
.form-group select{
    width:100%;
    padding:14px;
    border:1px solid var(--border);
    border-radius:12px;
    outline:none;
    font-size:1rem;
}

.form-group textarea{
    min-height:120px;
    resize:vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus{
    border-color:var(--primary);
}

.submit-btn,
.task-form button{
    width:100%;
    padding:15px;
    border:none;
    border-radius:12px;
    background:var(--primary);
    color:white;
    font-size:1rem;
    font-weight:600;
    cursor:pointer;
    transition:.3s;
}

.submit-btn:hover,
.task-form button:hover{
    background:var(--primary-dark);
}

/* ==========================
   DASHBOARD
========================== */

.dashboard{
    padding:30px;
    padding-bottom:100px;
}

.dashboard-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:30px;
}

.user-info h1{
    margin-bottom:5px;
}

.user-info p{
    color:var(--gray);
}

.header-actions{
    display:flex;
    align-items:center;
    gap:15px;
}

.notification-btn{
    width:50px;
    height:50px;
    border:none;
    border-radius:50%;
    background:white;
    cursor:pointer;
    box-shadow:0 2px 10px rgba(0,0,0,.08);
    font-size:1.2rem;
}

.profile-area img{
    width:55px;
    height:55px;
    border-radius:50%;
    object-fit:cover;
}

.bottom-nav{
    display:none;
}

.nav-item{
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    color:#777;
    font-size:.8rem;
}

.nav-item span{
    font-size:1.2rem;
    margin-bottom:2px;
}

.nav-item.active{
    color: var(--primary);
    font-weight:600;
}

.sidebar a{
    display:flex;
    align-items:center;
    gap:12px;
}

.sidebar a svg{
    width:20px;
    height:20px;
}

.nav-item{
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;
}

.nav-item svg{
    width:22px;
    height:22px;
}

/* ==========================
   ANALYTICS LINK
========================== */

.dashboard-links{
    margin-bottom:20px;
}

.dashboard-links a{
    color: var(--primary);
    font-weight:600;
}

/* ==========================
   ANALYTICS CARDS
========================== */

.stats-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:20px;
    margin-bottom:30px;
}

.stat-card{
    background:white;
    padding:25px;
    border-radius:18px;
    box-shadow:0 2px 10px rgba(0,0,0,.05);
    text-align:center;
}

.stat-card h3{
    color:var(--gray);
    margin-bottom:10px;
}

.stat-card h1{
    color:var(--primary);
}

.task-check{
    display:flex;
    align-items:center;
    gap:12px;
}

.task-check input{
    width:18px;
    height:18px;
    cursor:pointer;
}

.completed-task{
    text-decoration:line-through;
    color:#999;
}

.task-card.completed{
    border-left:5px solid #22c55e;
}

/* ==========================
   EMPTY STATE
========================== */

.empty-state{
    background:white;
    border-radius:20px;
    padding:100px 20px;
    text-align:center;
    box-shadow:0 2px 10px rgba(0,0,0,.05);
}

.empty-state h2{
    color:#999;
    margin-bottom:15px;
}

.empty-state p{
    color:var(--gray);
}

/* ==========================
   TASK LIST
========================== */

.task-list{
    display:grid;
    gap:20px;
}

.task-card{
    background:white;
    padding:20px;
    border-radius:18px;
    box-shadow:0 2px 10px rgba(0,0,0,.05);
    cursor:pointer;
    transition:.3s;
}

.task-card:hover{
    transform:translateY(-3px);
}

.task-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:10px;
}

.task-card h3{
    margin-bottom:5px;
}

.task-card p{
    color:var(--gray);
    margin-bottom:10px;
}

.delete-btn{
    border:none;
    background:none;
    cursor:pointer;
    font-size:1.2rem;
}

/* ==========================
   PRIORITIES
========================== */

.priority{
    display:inline-block;
    padding:6px 12px;
    border-radius:20px;
    font-size:.85rem;
    font-weight:600;
}

.priority.low{
    background:#dcfce7;
}

.priority.medium{
    background:#fef3c7;
}

.priority.high{
    background:#fee2e2;
}

/* ==========================
   FLOATING BUTTON
========================== */

.fab{
    position:fixed;
    bottom:30px;
    right:30px;

    width:65px;
    height:65px;

    border-radius:50%;

    background:var(--primary);
    color:white;

    display:flex;
    justify-content:center;
    align-items:center;

    font-size:2rem;
    font-weight:bold;

    box-shadow:0 5px 20px rgba(0,0,0,.2);

    z-index:1000;
}

/* ==========================
   MOBILE NAVIGATION
========================== */

.bottom-nav{
    display:none;
}

.nav-item{
    color:#777;
    font-size:1.3rem;
}

.nav-item .active{
    color:var(--primary);
}

/* --- Empty State --- */
.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    max-width: 500px;
    margin: 30px auto;
    padding: 30px 20px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    background: var(--card-bg);
}

.container img {
    width: 180px;
    height: auto;
    margin-bottom: 15px;
}

.container h2 {
    font-size: 20px;
    margin-bottom: 10px;
}

.container p {
    color: #777;
    max-width: 280px;
    line-height: 1.5;
    font-size: 14px;
}

.calendar-container{
    background:white;
    padding:25px;
    border-radius:20px;
    margin-bottom:25px;
}

.calendar-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
}

.calendar-header button{
    border:none;
    background:#6c4cff;
    color:white;
    padding:10px 15px;
    border-radius:10px;
    cursor:pointer;
}

.weekdays{
    display:grid;
    grid-template-columns:repeat(7,1fr);
    text-align:center;
    font-weight:600;
    margin-bottom:10px;
}

.calendar-grid{
    display:grid;
    grid-template-columns:repeat(7,1fr);
    gap:10px;
}

.calendar-day{
    min-height:90px;
    background:#f5f7fb;
    border-radius:12px;
    padding:10px;
    cursor:pointer;
    position:relative;
}

.calendar-day:hover{
    background:#ece8ff;
}

.task-indicator{
    position:absolute;
    right:8px;
    bottom:8px;

    width:24px;
    height:24px;

    border-radius:50%;

    background:#6c4cff;
    color:white;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:.8rem;
}

.calendar-tasks{
    background:white;
    padding:25px;
    border-radius:20px;
}


/* ==========================
   DARK MODE (toggled from profile)
========================== */

body.dark{
    background:#121212;
    color:#e0e0e0;
}

body.dark .sidebar{
    background:#1a1a2e;
    border-right-color:#2a2a2a;
}

body.dark .sidebar h2{
    color:#a78bfa;
}

body.dark .sidebar a{
    color:#ccc;
}

body.dark .sidebar a:hover,
body.dark .sidebar a.active{
    background:#7c3aed;
    color:white;
}

body.dark .stat-card,
body.dark .task-card,
body.dark .empty-state,
body.dark .calendar-container,
body.dark .calendar-tasks,
body.dark .container{
    background:#1e1e1e;
    color:#e0e0e0;
}

body.dark .stat-card h3{
    color:#aaa;
}

body.dark .task-card p{
    color:#aaa;
}

body.dark .notification-btn{
    background:#1e1e1e;
    color:#e0e0e0;
}

body.dark main.dashboard,
body.dark .dashboard{
    background:#121212;
}

body.dark .calendar-day{
    background:#2a2a2a;
    color:#e0e0e0;
}

body.dark .calendar-day:hover{
    background:#3a3060;
}

body.dark h1,
body.dark h2,
body.dark h3{
    color:#e0e0e0;
}

body.dark .user-info p{
    color:#aaa;
}
