:root {
    /* Colors - WK Marketing Corrected Theme (Coral Red) */
    --bg-body: #ffffff;
    /* Pure White */
    --bg-sidebar: #f8f9fa;
    /* Very light gray for subtle separation */
    --bg-card: #ffffff;
    /* Pure White */
    --bg-hover: #fff1f0;
    /* Very light red tint for hover */

    --text-primary: #111827;
    /* Almost Black (High Contrast) */
    --text-secondary: #6b7280;
    /* Gray */

    /* Brand Red from Screenshot */
    --accent-primary: #ff5f57;
    --accent-hover: #e04840;
    --accent-glow: rgba(255, 95, 87, 0.25);

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Spacing & Borders */
    --radius-md: 8px;
    /* Sharper, more professional corners */
    --radius-lg: 12px;
    --border-color: #e5e7eb;
    /* Light gray border */

    /* Layout */
    --sidebar-width: 270px;
    --header-height: 80px;

    /* Shadows - Crisp & Modern */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    /* Resembles the geometric sans in the screenshot */
    background-color: var(--bg-body);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

/* Layout Structure */
.app-container {
    display: flex;
    height: 100%;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
    transition: width 0.3s ease;
    z-index: 20;
}

.logo {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.nav-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.nav-btn:hover {
    background-color: var(--bg-hover);
    color: var(--accent-primary);
}

.nav-btn.active {
    background-color: #fff1f0;
    /* Light Red bg */
    color: var(--accent-primary);
    font-weight: 700;
}

.nav-btn i {
    width: 20px;
    text-align: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    /* Slightly squared matches the brand logo feeling */
    background-color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info .name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.user-info .role {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: white;
}

.top-bar {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    background-color: white;
    z-index: 10;
    border-bottom: 1px solid var(--border-color);
}

.page-title h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.date-display {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 4px;
}

.view-container {
    flex: 1;
    padding: 48px;
    overflow-y: auto;
    background-color: #fcfcfc;
    /* Extremely subtle grey for content area */
}

/* Utility / Components */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    border-color: #d1d5db;
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--accent-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    /* Squared match web buttons */
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 6px -1px rgba(255, 95, 87, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 10px 15px -3px rgba(255, 95, 87, 0.5);
    transform: translateY(-1px);
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
}

.form-input,
.form-select {
    width: 100%;
    padding: 14px;
    background-color: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

.form-input:focus,
.form-select:focus {
    background-color: #fff;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 16px;
}

.data-table th {
    text-align: left;
    padding: 16px;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 20px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 500;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background-color: #f9fafb;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-active {
    background-color: #fff1f0;
    color: var(--accent-primary);
}

.status-pending {
    background-color: #ecfdf5;
    color: #047857;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background-color: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95);
    transition: transform 0.2s;
}

.modal-overlay.open .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
}

/* Kanban Board */
.kanban-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
    gap: 12px;
}

.kanban-board {
    display: flex;
    gap: 24px;
    padding-bottom: 24px;
    overflow-x: auto;
    align-items: flex-start;
    min-height: calc(100vh - 200px);
}

.kanban-column {
    min-width: 300px;
    background-color: #f3f4f6;
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.kanban-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kanban-count {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100px;
    /* Drop zone area */
}

/* Kanban Card Styling */
.kanban-card {
    background: white;
    padding: 16px;
    border-radius: var(--radius-md);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid transparent;
    cursor: grab;
    transition: all 0.2s ease;
}

.kanban-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: var(--border-color);
}

.kanban-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.kanban-card-title {
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.kanban-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 12px;
}

.kanban-card-price {
    font-weight: 700;
    color: var(--text-primary);
}

.kanban-tag {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: #f0f0f0;
    color: #666;
}


/* Calendar View */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    gap: 1px;
}

.calendar-header-cell {
    background-color: #f9fafb;
    padding: 12px;
    text-align: center;
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-day {
    background-color: white;
    min-height: 120px;
    padding: 8px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background-color 0.2s;
}

.calendar-day:hover {
    background-color: #fcfcfc;
}

.calendar-day.empty {
    background-color: #fcfcfc;
}

.calendar-day.today {
    background-color: #fff1f0;
    /* Light red tint */
}

.day-number {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    align-self: flex-end;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.calendar-day.today .day-number {
    background-color: var(--accent-primary);
    color: white;
}

.calendar-event {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: #eff6ff;
    color: #1e3a8a;
    border-left: 3px solid #3b82f6;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform 0.1s;
    text-align: left;
}

.calendar-event:hover {
    transform: scale(1.02);
    z-index: 2;
}

.calendar-event.overdue {
    background-color: #fef2f2;
    color: #991b1b;
    border-left-color: #ef4444;
}

.calendar-event.completed {
    background-color: #f0fdf4;
    color: #166534;
    border-left-color: #22c55e;
    text-decoration: line-through;
    opacity: 0.7;
}