/**
 * Daily Task Routine Reminder - Modern Design System
 */

:root {
    --brand-primary: #4f46e5;
    --brand-primary-hover: #4338ca;
    --brand-secondary: #06b6d4;
    --brand-accent: #f59e0b;
    --bg-surface: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-card: 16px;
    --radius-sm: 8px;
    --shadow-subtle: 0 1px 3px 0 rgb(0 0 0 / 0.05), 0 1px 2px -1px rgb(0 0 0 / 0.05);
    --shadow-card: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.07);
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-surface);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* Typography utilities */
.fs-xs { font-size: 0.75rem; }
.fs-sm { font-size: 0.875rem; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.whitespace-pre-wrap { white-space: pre-wrap; word-break: break-word; }

/* Navbar styling */
.navbar-glass {
    background-color: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: var(--border-color) !important;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.text-brand {
    color: #1e1b4b;
    font-size: 1.15rem;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1;
}

.navbar .nav-link {
    color: #475569;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.navbar .nav-link:hover {
    color: var(--brand-primary);
    background-color: #f1f5f9;
}

.navbar .nav-link.active {
    color: var(--brand-primary);
    font-weight: 700;
    background-color: #eef2ff;
}

/* Primary Button Styling */
.btn-primary {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--brand-primary-hover);
    border-color: var(--brand-primary-hover);
    transform: translateY(-1px);
}

/* Dashboard Summary Cards */
.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 1.25rem;
    box-shadow: var(--shadow-subtle);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.summary-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Morning Routine Focus Card */
.morning-routine-card {
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
    border: 1px solid #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

/* Quick Add Box */
.quick-add-box {
    background: var(--bg-card);
    border: 1.5px dashed #cbd5e1;
    border-radius: var(--radius-card);
    padding: 0.75rem 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.quick-add-box:focus-within {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
    border-style: solid;
}

.quick-add-input {
    border: none;
    outline: none;
    font-size: 0.95rem;
    width: 100%;
    background: transparent;
}

/* Task Item Row / Card */
.task-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.65rem;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.task-item:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-subtle);
    transform: translateX(2px);
}

.task-item.completed {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    opacity: 0.75;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: #94a3b8;
}

/* Custom Checkbox */
.task-checkbox-custom {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid #cbd5e1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    flex-shrink: 0;
}

.task-checkbox-custom:hover {
    border-color: var(--brand-primary);
    background-color: #f5f3ff;
}

.task-checkbox-custom.checked {
    background-color: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

.task-checkbox-custom.crossed {
    background-color: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}

.task-item.cancelled {
    background-color: #fff5f5;
    border-color: #fecaca;
    opacity: 0.85;
}

.task-item.cancelled .task-title {
    text-decoration: line-through;
    color: #dc2626;
}

/* Timeline Components */
.timeline-container {
    position: relative;
    padding-left: 28px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 10px;
    width: 2px;
    background: #e2e8f0;
}

.timeline-step {
    position: relative;
    margin-bottom: 1.25rem;
}

.timeline-dot {
    position: absolute;
    left: -28px;
    top: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.timeline-dot.completed {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

.timeline-dot.active {
    background: var(--brand-primary);
    border-color: #c7d2fe;
}

/* Priority Badges */
.badge-prio-high {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.badge-prio-medium {
    background-color: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
}
.badge-prio-low {
    background-color: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
}

/* Overdue Badge Pulse */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.75; transform: scale(1.05); }
}
.animate-pulse {
    animation: pulse 2s infinite ease-in-out;
}

/* Calendar styling */
.calendar-table {
    border-collapse: separate;
    border-spacing: 6px;
    width: 100%;
}

.calendar-day {
    min-height: 80px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 6px 8px;
    transition: all 0.15s ease;
    cursor: pointer;
    vertical-align: top;
}

.calendar-day:hover {
    border-color: var(--brand-primary);
    background-color: #f8fafc;
}

.calendar-day.today {
    border: 2px solid var(--brand-primary);
    background-color: #f5f3ff;
}

.calendar-day.inactive {
    background-color: #f8fafc;
    color: #cbd5e1;
    cursor: default;
}

.calendar-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .summary-card {
        padding: 1rem;
    }
    .task-item {
        padding: 0.75rem;
    }
    .timeline-container {
        padding-left: 20px;
    }
    .timeline-dot {
        left: -20px;
        width: 18px;
        height: 18px;
    }
    .timeline-container::before {
        left: 8px;
    }
}
