:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --bg-main: #f3f6f9;
    --sidebar-bg: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-active: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    padding: 24px;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
}

.logo-icon {
    color: var(--primary);
    width: 32px;
    height: 32px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.025em;
}

.nav-menu {
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--sidebar-text);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--sidebar-active);
}

.nav-item.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.sidebar-footer {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    padding: 40px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

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

.content-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.date-input {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text-main);
    background: white;
    box-shadow: var(--shadow-sm);
    outline: none;
}

.primary-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.primary-btn:hover {
    background-color: var(--primary-hover);
}

/* Schedule Grid */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.schedule-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    animation: fadeIn 0.4s ease-out;
}

.schedule-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.schedule-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--primary);
}

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

.category-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background-color: #ebf5ff;
    color: var(--primary);
}

.category-tag.work { background-color: #fef3c7; color: #d97706; }
.category-tag.personal { background-color: #d1fae5; color: #059669; }
.category-tag.important { background-color: #fee2e2; color: #dc2626; }

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.card-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}

.delete-btn {
    color: #ef4444;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.delete-btn:hover { background-color: #fee2e2; }

.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 0;
    color: var(--text-muted);
}

.empty-state p { margin-top: 16px; font-weight: 500; }

/* Modal Stying */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-card {
    background: white;
    width: 100%;
    max-width: 450px;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hidden .modal-card { transform: translateY(20px); }

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

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label { font-size: 0.875rem; font-weight: 600; color: var(--text-main); }

.form-group input, .form-group select, .form-group textarea {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    outline: none;
    font-size: 1rem;
}

.form-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }

.submit-btn {
    margin-top: 12px;
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

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