/* ==================== RESET & BASE STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* New Color Theme */
    --primary-color: #39ADC0;
    --primary-hover: #2d8a9a;
    --primary-light: rgba(57, 173, 192, 0.1);
    
    /* Backgrounds */
    --bg-white: #ffffff;
    --bg-light: #f9f9f9;
    --bg-gray: #f2f2f2;
    --bg-hover: #f2f2f2;
    
    /* Text Colors */
    --text-dark: #333333;
    --text-medium: #666666;
    --text-light: #999999;
    
    /* Borders & Shadows */
    --border-color: #e0e0e0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.12);
    
    /* Status Colors */
    --success-color: #10B981;
    --error-color: #EF4444;
    --warning-color: #F59E0B;
    
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Inter', 'Roboto', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== LAYOUT ==================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== HEADER ==================== */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-name {
    color: var(--text-medium);
    font-size: 0.95rem;
}

.nav-link {
    color: var(--text-medium);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    background: transparent;
    border: none;
    z-index: 1002;
    position: relative;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 280px;
        background: var(--bg-white);
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        gap: 1.5rem;
        z-index: 1001;
        overflow-y: auto;
    }
    
    .nav.active {
        right: 0;
    }
    
    .nav-link {
        width: 100%;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--bg-gray);
        font-size: 1.1rem;
    }
    
    .user-name {
        width: 100%;
        padding: 0.75rem 0;
        font-weight: 600;
        color: var(--primary-color);
        border-bottom: 2px solid var(--primary-color);
        margin-bottom: 1rem;
    }
    
    /* Overlay - Behind menu but above content */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }
    
    .nav-overlay.active {
        display: block;
        z-index: 0;
    }
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    padding: 2rem 0;
}

.planner-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.left-column,
.right-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ==================== PLANNER SECTIONS ==================== */
.planner-section {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s;
}

.planner-section:hover {
    box-shadow: var(--shadow-md);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--bg-light);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: -0.3px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-medium);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
}

/* ==================== TASK LISTS ==================== */
.task-list,
.notes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem;
    background: var(--bg-light);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.task-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-color);
}

.task-item.completed {
    opacity: 0.6;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-top: 2px;
}

.task-content {
    flex: 1;
    min-width: 0;
}

.task-text {
    color: var(--text-dark);
    line-height: 1.5;
    word-wrap: break-word;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: var(--text-light);
}

.task-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.task-item:hover .task-actions {
    opacity: 1;
}

.btn-edit,
.btn-delete {
    padding: 0.25rem 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

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

.btn-edit:hover {
    background: var(--accent-blue);
    color: white;
}

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

.btn-delete:hover {
    background: var(--error-color);
    color: white;
}

/* ==================== SCHEDULE ==================== */
.schedule-section {
    max-height: 600px;
    overflow-y: auto;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.schedule-item {
    display: grid;
    grid-template-columns: 30px 80px 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.625rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.schedule-item:hover {
    background: var(--bg-light);
}

.schedule-item.completed .schedule-activity {
    text-decoration: line-through;
    opacity: 0.6;
}

.schedule-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.schedule-checkbox:disabled {
    cursor: not-allowed;
    opacity: 0.3;
}

.schedule-time {
    font-weight: 600;
    color: var(--text-medium);
    font-size: 0.9rem;
}

.schedule-activity {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-dark);
    background: var(--bg-white);
    transition: all 0.2s;
}

.schedule-activity:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.1);
}

/* ==================== NOTES ==================== */
.note-item {
    padding: 1rem;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.note-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.note-title {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
}

.note-content {
    color: var(--text-medium);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: slideUp 0.3s;
}

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

.modal-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.75rem;
    font-weight: 300;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: all 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* ==================== BUTTONS ==================== */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

/* ==================== AUTH PAGES ==================== */
.auth-page {

    background: linear-gradient(135deg, #39ADC0 0%, #2d8a9a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
}

.auth-box {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-medium);
    margin-bottom: 2rem;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.auth-footer {
    text-align: center;
    color: var(--text-medium);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ==================== MESSAGES ==================== */
.message {
    padding: 0.875rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.message.success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #34D399;
}

.message.error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #F87171;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-light);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    font-size: 0.9rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 968px) {
    .planner-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .main-content {
        padding: 1.5rem 0;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .planner-section {
        padding: 1.25rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .schedule-item {
        grid-template-columns: 25px 70px 1fr;
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .schedule-time {
        font-size: 0.85rem;
    }
    
    .stat-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem 0;
    }
    
    .planner-section {
        padding: 1rem;
        border-radius: var(--radius-md);
    }
    
    .section-header {
        margin-bottom: 1rem;
    }
    
    .auth-box {
        padding: 1.5rem;
    }
    
    .auth-title {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 0.875rem 1.25rem;
    }
    
    .task-item {
        padding: 0.75rem;
    }
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

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

/* ==================== UTILITIES ==================== */
.text-muted {
    color: var(--text-light);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ==================== PWA INSTALL BANNER ==================== */
.pwa-install-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-top: 2px solid var(--primary-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.pwa-banner-icon {
    font-size: 2rem;
}

.pwa-banner-text {
    flex: 1;
}

.pwa-banner-text strong {
    display: block;
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.pwa-banner-text p {
    color: var(--text-medium);
    font-size: 0.875rem;
    margin: 0;
}

.pwa-close-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.pwa-close-btn:hover {
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .pwa-banner-content {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .pwa-banner-icon {
        font-size: 1.5rem;
    }
    
    .pwa-banner-text strong {
        font-size: 0.95rem;
    }
    
    #pwa-install-btn {
        width: 100%;
        order: 3;
        flex-basis: 100%;
    }
}
