/* =========================================================================
   Design Tokens & Variables (Deepshitech Luxury Minimal Theme)
========================================================================== */
:root {
    /* Color Palette */
    --bg-main: #000000;
    --bg-card: #0a0a0a;
    --bg-card-hover: #121212;
    --bg-sidebar: #050505;
    
    --border-color: #1a1a1a;
    --border-light: #2a2a2a;
    
    /* Akcent / Highlight */
    --accent-gold: #C19A3B;
    --accent-gold-hover: #DFB244;
    
    /* Typography */
    --text-primary: #ffffff;
    --text-secondary: #999999;
    --text-muted: #555555;
    
    /* Status Colors */
    --status-red: #ff4b4b;
    --status-red-bg: rgba(255, 75, 75, 0.1);
    
    --status-yellow: #ffb800;
    --status-yellow-bg: rgba(255, 184, 0, 0.1);
    
    --status-green: #00e074;
    --status-green-bg: rgba(0, 224, 116, 0.1);

    --status-blue: #00bfff;
    --status-blue-bg: rgba(0, 191, 255, 0.1);
    
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Metrics */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-pill: 50px;
}

/* =========================================================================
   Global Reset & Base
========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

/* =========================================================================
   Layout Grid
========================================================================== */
.layout {
    display: flex;
    min-height: 100vh;
}

/* =========================================================================
   Sidebar
========================================================================== */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    padding-left: 15px; /* Restored left padding */
}

.sidebar-logo {
    max-width: 100%;
    height: auto;
    max-height: 48px;
    margin: 0;
    display: block;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-item i {
    width: 20px;
    height: 20px;
}

.nav-item:hover {
    color: var(--text-primary);
    background-color: var(--bg-card);
}

.nav-item.active {
    color: var(--text-primary);
    background-color: var(--bg-card-hover);
    border-left: 3px solid var(--accent-gold);
}

.nav-item.active i {
    color: var(--accent-gold);
}

/* =========================================================================
   Main Content
========================================================================== */
.main-content {
    flex: 1;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
}

/* Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.top-header h1 {
    font-size: 28px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-card);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: var(--status-green);
    border-radius: 50%;
    animation: pulseLive 2s infinite;
}

@keyframes pulseLive {
    0% { box-shadow: 0 0 0 0 rgba(0, 224, 116, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(0, 224, 116, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 224, 116, 0); }
}

.status-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Views & State */
.view-section {
    animation: fadeIn 0.3s ease;
    height: 100%;
}

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

.placeholder-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 80px 40px;
    text-align: center;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.placeholder-icon {
    width: 64px;
    height: 64px;
    color: var(--border-light);
    margin-bottom: 10px;
}

.placeholder-card h2 {
    color: var(--text-primary);
    font-size: 24px;
}


/* Metrics Grid */
.metrics-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto; /* Handle smaller screens */
    padding-bottom: 5px; /* for scrollbar spacing */
    margin-bottom: 30px;
}

/* Custom scrollbar for metrics grid */
.metrics-grid::-webkit-scrollbar {
    height: 6px;
}
.metrics-grid::-webkit-scrollbar-track {
    background: var(--bg-main);
}
.metrics-grid::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

.metric-card {
    min-width: 200px;
    flex: 1;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.metric-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    background-color: var(--bg-card-hover);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.05); /* Default */
    color: var(--text-primary);
}

/* Metric Colors */
.metric-icon.alert-red { color: var(--status-red); background-color: var(--status-red-bg); }
.metric-icon.alert-yellow { color: var(--status-yellow); background-color: var(--status-yellow-bg); }
.metric-icon.alert-green { color: var(--status-green); background-color: var(--status-green-bg); }
.metric-icon.alert-blue { color: var(--status-blue); background-color: var(--status-blue-bg); }

.metric-title {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 4px;
}

.metric-value {
    font-size: 24px;
}

/* Recent Leads Section */
.recent-leads {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.section-header h2 {
    font-size: 20px;
}

.filter-controls {
    display: flex;
    gap: 8px;
    background-color: var(--bg-main);
    padding: 4px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
}

.filter-btn {
    background: none;
    border: none;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.filter-btn.active {
    background-color: var(--bg-card-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

/* Table Container */
.table-container {
    width: 100%;
    overflow-x: auto;
}

.leads-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

.leads-table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.leads-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.leads-table tr:hover td {
    background-color: var(--bg-main); /* Slight hover effect on raw black */
}

.leads-table tr:last-child td {
    border-bottom: none;
}

/* Table Specific Styles */
.id-col { color: var(--text-muted); font-size: 13px; }

.contact-name { font-weight: 500; color: var(--text-primary); display: block; margin-bottom: 2px;}
.contact-phone { font-size: 12px; color: var(--text-secondary); }

.service-type { color: var(--text-secondary); }

.guests-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--bg-main);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
    font-size: 12px;
}

.guests-count i { width: 14px; height: 14px; color: var(--text-muted); }

.event-name { color: var(--text-primary); }
.event-date { font-size: 13px; color: var(--text-secondary); }

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-new { color: var(--status-red); background-color: var(--status-red-bg); border: 1px solid rgba(255, 75, 75, 0.2); }
.status-new::before { background-color: var(--status-red); }

.status-contacted { color: var(--status-yellow); background-color: var(--status-yellow-bg); border: 1px solid rgba(255, 184, 0, 0.2); }
.status-contacted::before { background-color: var(--status-yellow); }

.status-qualified { color: var(--status-green); background-color: var(--status-green-bg); border: 1px solid rgba(0, 224, 116, 0.2); }
.status-qualified::before { background-color: var(--status-green); }

.status-closed { color: var(--status-blue); background-color: var(--status-blue-bg); border: 1px solid rgba(0, 191, 255, 0.2); }
.status-closed::before { background-color: var(--status-blue); }

/* Buttons */
.btn-primary {
    background-color: var(--accent-gold);
    color: var(--bg-main);
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary:hover {
    background-color: var(--accent-gold-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(193, 154, 59, 0.3);
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
}
.btn-icon:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}
.btn-ghost:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}
.btn-ghost.active {
    background: var(--bg-card-hover);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.btn-view {
    background-color: var(--accent-gold);
    color: var(--bg-main);
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-view:hover {
    background-color: var(--accent-gold-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(193, 154, 59, 0.3);
}

.btn-view i {
    width: 14px;
    height: 14px;
}

/* =========================================================================
   Modal System
========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 500px;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.modal-overlay.active .modal-box {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 18px;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    transition: all 0.2s ease;
}

.btn-close:hover {
    color: var(--text-primary);
    background: var(--bg-main);
}

.modal-content {
    padding: 24px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-detail-row {
    display: flex;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}
.modal-detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-label {
    width: 120px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
    flex: 1;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* =========================================================================
   Google Calendar Clone (Deepshitech Theme)
========================================================================== */
.calendar-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    height: calc(100% - 20px);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.month-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.calendar-nav h2 {
    font-size: 22px;
    margin-left: 10px;
    font-weight: 400; /* Sleeker look for dark theme */
}

.calendar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.calendar-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.calendar-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid var(--border-color);
}

.calendar-days-header div {
    padding: 12px 10px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    border-right: 1px solid var(--border-color);
}
.calendar-days-header div:last-child {
    border-right: none;
}

.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: minmax(100px, 1fr);
    flex: 1;
    overflow-y: auto;
}

.calendar-day {
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background-color: var(--bg-main);
}
.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 13px;
    color: var(--text-primary);
    align-self: center;
    margin-bottom: 4px;
    transition: background 0.2s ease;
}

.calendar-day.today .calendar-day-number {
    background-color: var(--accent-gold);
    color: var(--bg-main);
    font-weight: 600;
}

.calendar-day.other-month {
    background-color: var(--bg-card); /* Slightly different shade to differentiate */
}
.calendar-day.other-month .calendar-day-number {
    color: var(--text-muted);
}

/* Event Chips */
.event-chip {
    background-color: rgba(193, 154, 59, 0.15); /* Muted Gold */
    border-left: 2px solid var(--accent-gold);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-primary);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
}

.event-chip:hover {
    background-color: rgba(193, 154, 59, 0.3);
}

/* Color variations for events */
.event-chip.blue-event { background-color: var(--status-blue-bg); border-left-color: var(--status-blue); }
.event-chip.blue-event:hover { background-color: rgba(0, 191, 255, 0.25); }

.event-chip.green-event { background-color: var(--status-green-bg); border-left-color: var(--status-green); }
.event-chip.green-event:hover { background-color: rgba(0, 224, 116, 0.25); }
