/* CSS Design System for Mhoogrob App */

:root {
    /* Color Palette - Gold & Piglet Pink Vibe (Premium Light Theme) */
    --bg-main: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-input: #f1f5f9;
    --border-color: #cbd5e1;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --accent-pink: #db2777;
    --accent-pink-hover: #be185d;
    --accent-gold: #b45309;
    --accent-gold-hover: #78350f;
    --accent-gold-light: rgba(180, 83, 9, 0.06);
    
    --status-paid: #15803d;
    --status-paid-bg: rgba(21, 128, 61, 0.08);
    --status-deposit: #b45309;
    --status-deposit-bg: rgba(180, 83, 9, 0.08);
    --status-unpaid: #b91c1c;
    --status-unpaid-bg: rgba(185, 28, 28, 0.08);
    
    --sidebar-width: 260px;
    --bottom-nav-height: 64px;
    
    --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);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets & fonts */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    accent-color: var(--accent-pink);
    min-height: 100vh;
}

/* Layout container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation (Desktop) */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 24px 16px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding-left: 8px;
}

.logo-emoji {
    font-size: 2.2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.logo-text h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-pink);
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    background: none;
    border: none;
    padding: 14px 16px;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    transition: var(--transition-fast);
    width: 100%;
}

.nav-btn .icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

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

.nav-btn.active {
    background: linear-gradient(135deg, rgba(255, 122, 144, 0.15) 0%, rgba(228, 168, 83, 0.05) 100%);
    color: var(--accent-pink);
    border-left: 4px solid var(--accent-pink);
    padding-left: 12px; /* adjust for border */
}

.sidebar-footer {
    padding-left: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    padding: 40px;
    min-height: 100vh;
    padding-bottom: 80px; /* space for mobile nav if it wraps */
}

/* Mobile Header (Hidden on Desktop) */
.mobile-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 90;
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-logo h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-pink);
}

/* Bottom Nav (Hidden on Desktop) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    z-index: 100;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
}

.bottom-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    flex-grow: 1;
    height: 100%;
    transition: var(--transition-fast);
}

.bottom-nav-btn .icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

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

.bottom-nav-btn.active {
    color: var(--accent-pink);
}

/* View panels display control */
.view-panel {
    display: none;
    animation: fadeIn var(--transition-normal);
}

.view-panel.active {
    display: block;
}

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

/* Typography elements */
.view-header {
    margin-bottom: 32px;
}

.view-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.view-header .subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

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

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 6px -1px rgba(249, 115, 22, 0.15), 0 2px 4px -1px rgba(249, 115, 22, 0.1);
    transition: var(--transition-normal);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary .icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.btn-secondary {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-fast);
}

.btn-secondary:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--text-secondary);
}

.btn-secondary .icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.btn-secondary-label {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-fast);
}

.btn-secondary-label:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--text-secondary);
}

.btn-secondary-label .icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.btn-danger {
    background-color: var(--status-unpaid-bg);
    color: var(--status-unpaid);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-fast);
}

.btn-danger:hover {
    background-color: var(--status-unpaid);
    color: white;
}

.btn-danger .icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.btn-round {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition-fast);
}

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

.btn-icon .icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 4px;
}

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

/* Metrics Dashboard Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.metric-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.metric-card.paid::before { background-color: var(--status-paid); }
.metric-card.unpaid::before { background-color: var(--status-unpaid); }
.metric-card.schedules::before { background-color: var(--accent-gold); }

.metric-icon {
    font-size: 2.2rem;
    background-color: var(--bg-main);
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.metric-info {
    display: flex;
    flex-direction: column;
}

.metric-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.metric-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Dashboard Details Section */
.dashboard-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.dashboard-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.card-emoji {
    font-size: 1.25rem;
}

.card-header h4 {
    font-size: 1.05rem;
    font-weight: 600;
}

.card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Empty states styling */
.empty-state {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 120px;
}

/* Notification Alert Items */
.alert-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-main);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    border-left: 4px solid var(--status-unpaid);
}

.alert-item.near-due {
    border-left-color: var(--status-deposit);
}

.alert-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.alert-place {
    font-weight: 600;
    font-size: 0.95rem;
}

.alert-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.alert-status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.alert-status-badge.danger {
    background-color: var(--status-unpaid-bg);
    color: var(--status-unpaid);
}

.alert-status-badge.warning {
    background-color: var(--status-deposit-bg);
    color: var(--status-deposit);
}

/* Today schedule item list style */
.today-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-main);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: var(--transition-fast);
}

.today-item:hover {
    transform: translateX(4px);
}

.today-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.today-loc-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent-gold);
}

.today-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.today-payment-badge {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    align-self: center;
}

.today-payment-badge.paid { background-color: var(--status-paid-bg); color: var(--status-paid); }
.today-payment-badge.deposit { background-color: var(--status-deposit-bg); color: var(--status-deposit); }
.today-payment-badge.unpaid { background-color: var(--status-unpaid-bg); color: var(--status-unpaid); }

/* Schedule Tab - Calendar and Lists Layout */
.schedule-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.month-selector-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: var(--radius-md);
}

.month-selector-bar h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

/* Calendar Styling */
.calendar-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    min-height: 70px;
    background-color: var(--bg-main);
    border-radius: var(--radius-md);
    padding: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-fast);
}

.calendar-day:hover {
    border-color: var(--accent-pink);
    transform: scale(1.02);
}

.calendar-day.empty {
    background: none;
    border: none;
    cursor: default;
}

.calendar-day.empty:hover {
    transform: none;
}

.day-number {
    font-weight: 600;
    font-size: 0.9rem;
}

.calendar-day.today {
    border-color: var(--accent-gold);
    background-color: rgba(228, 168, 83, 0.05);
}

.calendar-day.selected {
    background-color: rgba(255, 122, 144, 0.1);
    border-color: var(--accent-pink);
}

.day-dots {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-top: 4px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.dot.unpaid { background-color: var(--status-unpaid); }
.dot.deposit { background-color: var(--status-deposit); }
.dot.paid { background-color: var(--status-paid); }

/* Schedule Lists UI */
.schedule-list-section {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title h4 {
    font-size: 1.05rem;
    font-weight: 600;
}

.form-select-sm {
    background-color: var(--bg-main);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    outline: none;
}

.schedules-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Schedule Card detailed styles */
.schedule-item-card {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    transition: var(--transition-fast);
}

.schedule-item-card:hover {
    border-color: var(--border-color);
    box-shadow: var(--shadow-md);
}

.card-details-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.schedule-date-badge {
    align-self: flex-start;
    background-color: var(--bg-card);
    color: var(--accent-gold);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.schedule-title {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.schedule-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-row .icon {
    width: 16px;
    height: 16px;
    fill: var(--text-muted);
}

.meta-phone-link {
    color: var(--accent-pink);
    text-decoration: none;
    font-weight: 500;
}

.meta-phone-link:hover {
    text-decoration: underline;
}

.notes-box {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    background-color: var(--bg-card);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    border-left: 3px solid var(--text-muted);
}

.card-details-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
}

.price-summary {
    text-align: right;
}

.price-main {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.price-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.card-actions {
    display: flex;
    gap: 8px;
}

.slip-thumbnail-area {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.slip-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-fast);
}

.slip-thumbnail:hover {
    transform: scale(1.05);
    border-color: var(--accent-pink);
}

.slip-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Locations Tab Grid & Cards */
.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.location-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    transition: var(--transition-fast);
}

.location-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-md);
}

.location-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    padding-right: 30px; /* Space for action button */
}

.location-card-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-grow: 1;
}

.location-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

/* Settings Views Components */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 650px;
}

.settings-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

.card-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.backup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.other-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.about-app {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Customizable dialog modal window */
.custom-dialog {
    border: none;
    border-radius: var(--radius-lg);
    background-color: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden;
    z-index: 1000;
}

.custom-dialog::backdrop {
    background-color: rgba(12, 16, 21, 0.8);
    backdrop-filter: blur(4px);
}

.custom-dialog form {
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

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

.dialog-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

.dialog-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

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

/* Forms components */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-group.col {
    flex: 1;
    min-width: 0; /* Prevents overflow inside flex row */
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

label .required {
    color: var(--status-unpaid);
}

label .muted {
    font-weight: 400;
    font-size: 0.75rem;
}

.form-input, .form-select {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    outline: none;
    width: 100%;
    transition: var(--transition-fast);
}

.form-input:focus, .form-select:focus {
    border-color: var(--accent-pink);
    box-shadow: 0 0 0 2px rgba(255, 122, 144, 0.2);
}

/* Auto sizing field support */
.field-sizing-content {
    field-sizing: content;
    min-height: 60px;
    resize: vertical;
}

/* Custom Upload slip components */
.slip-upload-area {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    background-color: var(--bg-input);
    transition: var(--transition-fast);
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slip-upload-area:hover {
    border-color: var(--accent-pink);
}

.slip-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;
}

.upload-icon {
    font-size: 1.8rem;
}

.upload-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.slip-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    position: relative;
    z-index: 2; /* stay above file input click capture if preview is showing delete */
}

.slip-preview-img {
    max-width: 150px;
    max-height: 150px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.btn-remove-slip {
    background-color: rgba(239, 68, 68, 0.8);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-remove-slip:hover {
    background-color: var(--status-unpaid);
}

.btn-cancel {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

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

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(12, 16, 21, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--text-primary);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 2100;
}

.lightbox-close:hover {
    color: var(--accent-pink);
}

.lightbox-content-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 90%;
    max-height: 85%;
}

.lightbox-content {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: zoom var(--transition-normal);
}

@keyframes zoom {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-caption {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

.lightbox-actions {
    display: flex;
    justify-content: center;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Toast Notification Styling */
.toast-container {
    position: fixed;
    bottom: 80px; /* above mobile nav */
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 5000;
}

.toast {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-pink);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn var(--transition-normal) forwards;
}

.toast.success { border-left-color: var(--status-paid); }
.toast.error { border-left-color: var(--status-unpaid); }
.toast.info { border-left-color: var(--accent-gold); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.fade-out {
    animation: fadeOut var(--transition-normal) forwards;
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-8px); }
}

/* Responsive breakpoint styling */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .mobile-header {
        display: flex;
    }
    
    .bottom-nav {
        display: flex;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px 16px 100px 16px; /* space for bottom nav */
    }
    
    .view-header {
        margin-bottom: 20px;
    }
    
    .view-header h2 {
        font-size: 1.4rem;
    }
    
    .dashboard-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 24px;
    }
    
    .metric-card {
        padding: 16px 20px;
    }
    
    .metric-icon {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    
    .metric-info h3 {
        font-size: 1.3rem;
    }
    
    .custom-dialog {
        width: 95%;
        max-height: 90vh;
    }
    
    .dialog-body {
        padding: 16px;
        gap: 14px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 14px;
    }
    
    .toast-container {
        left: 16px;
        right: 16px;
        bottom: 80px;
    }
    
    .schedule-item-card {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .card-details-right {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        border-top: 1px solid var(--border-color);
        padding-top: 16px;
    }
    
    .price-summary {
        text-align: left;
    }
    
    .slip-thumbnail-area {
        align-items: flex-start;
    }
    
    .calendar-day {
        min-height: 56px;
        padding: 4px;
    }
}

.day-locations-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    margin-top: 2px;
}

.day-location-label {
    font-size: 0.62rem;
    color: var(--accent-gold);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    font-weight: 600;
    line-height: 1.1;
}
