@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Roboto:wght@500&display=swap');

:root {
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.75);
    --card-border: rgba(99, 102, 241, 0.25);
    --primary-indigo: #6366f1;
    --primary-hover: #4f46e5;
    --amber-accent: #f59e0b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success-green: #10b981;
    --danger-red: #ef4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body, button, input, select, textarea, optgroup {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    -webkit-font-smoothing: antialiased;
}
body { background: radial-gradient(circle at top right, #1e1b4b, #0f172a, #090d16); color: var(--text-main); min-height: 100vh; }

/* Emoji & Icon Isolation for iOS Safari rendering */
.tab-icon, .emoji, .icon-emoji {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
}

header {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 2rem;
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 100;
}

.logo { font-size: 1.25rem; font-weight: 700; color: #818cf8; display: flex; align-items: center; gap: 0.5rem; }
.logo-badge { background: var(--primary-indigo); color: white; padding: 0.2rem 0.6rem; border-radius: 6px; font-size: 0.9rem; }

.user-status-pill {
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--card-border);
    padding: 0.5rem 1rem; border-radius: 20px; font-size: 0.85rem; display: flex; align-items: center; gap: 0.5rem;
}

.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber-accent); }
.status-dot.active { background: var(--success-green); box-shadow: 0 0 8px var(--success-green); }

.container { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }

.page-header { margin-bottom: 1.5rem; }
.page-title { font-size: 2rem; font-weight: 700; }
.page-sub { color: var(--text-muted); }

/* Navigation Tabs */
.tabs-header {
    display: flex; gap: 0.5rem; overflow-x: auto; margin-bottom: 1.5rem;
    background: rgba(15, 23, 42, 0.6); padding: 0.4rem; border-radius: 12px; border: 1px solid var(--card-border);
}
.tab-btn {
    padding: 0.6rem 1.2rem; border-radius: 8px; font-weight: 600; font-size: 0.9rem;
    background: transparent; color: var(--text-muted); border: none; cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; gap: 0.5rem; white-space: nowrap;
}
.tab-btn:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.05); }
.tab-btn.active { background: var(--primary-indigo); color: white; box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4); }
.tab-btn .tab-icon {
    font-size: 1.15rem;
    margin-right: 0.35rem;
    font-weight: 400 !important;
    font-style: normal !important;
    display: inline-block;
    flex-shrink: 0;
}

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 1.5rem; }

.card {
    background: var(--card-bg); backdrop-filter: blur(16px);
    border: 1px solid var(--card-border); border-radius: 16px; padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); margin-bottom: 1.5rem;
    position: relative;
}

.card-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 1rem; color: #a5b4fc; display: flex; justify-content: space-between; align-items: center; }

.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.4rem; font-weight: 500; }
.form-control {
    width: 100%; background: rgba(15, 23, 42, 0.6); border: 1px solid var(--card-border);
    border-radius: 10px; padding: 0.75rem 1rem; color: var(--text-main); outline: none; transition: border 0.2s;
}
.form-control:focus { border-color: var(--primary-indigo); }

/* Calendar & Date Picker White Icon */
input[type="datetime-local"],
input[type="date"],
input[type="time"] {
    color-scheme: dark;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: brightness(0) invert(1);
    cursor: pointer;
}

.btn {
    padding: 0.75rem 1.5rem; border-radius: 10px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s;
}
.btn-indigo { background: linear-gradient(135deg, var(--primary-indigo), var(--primary-hover)); color: white; box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4); }
.btn-indigo:hover { transform: translateY(-1px); }

.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.metric-box { background: rgba(15, 23, 42, 0.5); padding: 1rem; border-radius: 12px; text-align: center; border: 1px solid var(--card-border); }
.metric-val { font-size: 1.5rem; font-weight: 700; color: #818cf8; }
.metric-lbl { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }

.offer-card { background: rgba(15, 23, 42, 0.8); border: 1px solid var(--card-border); border-radius: 14px; overflow: hidden; margin-bottom: 1rem; position: relative; }
.offer-banner { height: 130px; background-size: cover; background-position: center; position: relative; background-color: #1e293b; }

.badge-status {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}
.status-PENDING_APPROVAL { background: var(--amber-accent); color: #000; }
.status-APPROVED { background: var(--success-green); color: #fff; }
.status-REJECTED { background: var(--danger-red); color: #fff; }

/* Verification Badge Styles */
.badge-verification {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.badge-verified {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}
.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}
.badge-rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}
.badge-unverified {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Pagination Styles */
.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--card-border);
    flex-wrap: wrap;
    gap: 0.5rem;
}
.pagination-info { font-size: 0.85rem; color: var(--text-muted); }
.pagination-controls { display: flex; gap: 0.5rem; align-items: center; }
.pagination-select { width: auto !important; padding: 0.25rem 0.5rem !important; font-size: 0.8rem !important; background: rgba(15, 23, 42, 0.8) !important; }
.pagination-btn { padding: 0.25rem 0.65rem !important; font-size: 0.8rem !important; background: rgba(255, 255, 255, 0.08) !important; color: var(--text-main) !important; border: 1px solid var(--card-border) !important; border-radius: 6px !important; }
.pagination-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.hidden { display: none !important; }

/* Required Field & Error Animation Styles */
.required-asterisk { color: #ef4444; font-weight: bold; margin-left: 3px; font-size: 1rem; }
.form-control.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.35) !important;
    animation: shake 0.3s ease-in-out;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.edit-mode-banner {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Google Places Autocomplete Dark Glassmorphism Styling */
.pac-container {
    background-color: #1e293b !important;
    border: 1px solid rgba(99, 102, 241, 0.4) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65) !important;
    font-family: 'Outfit', sans-serif !important;
    margin-top: 6px !important;
    z-index: 999999 !important;
    backdrop-filter: blur(16px) !important;
    overflow: hidden !important;
}

.pac-item {
    padding: 10px 14px !important;
    font-size: 0.9rem !important;
    color: #94a3b8 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
    cursor: pointer !important;
    transition: background 0.15s ease, color 0.15s ease !important;
}

.pac-item:hover, .pac-item-selected {
    background-color: rgba(99, 102, 241, 0.25) !important;
    color: #ffffff !important;
}

.pac-item-query {
    font-size: 0.95rem !important;
    color: #f8fafc !important;
    font-weight: 600 !important;
}

.pac-matched {
    color: #818cf8 !important;
    font-weight: 700 !important;
}

.pac-icon {
    filter: invert(1) brightness(1.5) !important;
}

.hdpi .pac-icon {
    filter: invert(1) brightness(1.5) !important;
}

.pac-container:empty {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
}

/* Mobile Responsive Design Enhancements */
@media (max-width: 768px) {
    header {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    header > div {
        justify-content: space-between;
        width: 100%;
    }

    .container {
        margin: 1rem auto;
        padding: 0 0.75rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .grid-2 {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
    }

    .tabs-header {
        padding: 0.35rem;
        gap: 0.35rem;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        padding: 0.5rem 0.85rem;
        font-size: 0.82rem;
    }

    .card {
        padding: 1.25rem;
        border-radius: 14px;
    }

    .form-control, input, select, textarea {
        font-size: 16px !important;
    }

    .modal-dialog {
        width: 95% !important;
        max-width: 95% !important;
        padding: 1.25rem !important;
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   Desi Charlotte - Custom Polished Popup & Dialog System (NaturalUI)
   ========================================================================== */
.custom-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 11, 22, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-popup-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.custom-popup-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.99));
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 35px rgba(99, 102, 241, 0.18);
    width: 100%;
    max-width: 440px;
    padding: 1.75rem 1.85rem;
    color: #f8fafc;
    transform: scale(0.92) translateY(8px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.custom-popup-overlay.active .custom-popup-card {
    transform: scale(1) translateY(0);
}

/* Icon Badges */
.custom-popup-icon-badge {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    margin-bottom: 1.15rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    position: relative;
}

.custom-popup-icon-badge.danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1.5px solid rgba(239, 68, 68, 0.5);
    color: #ef4444;
    box-shadow: 0 0 24px rgba(239, 68, 68, 0.3);
}

.custom-popup-icon-badge.warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1.5px solid rgba(245, 158, 11, 0.5);
    color: #f59e0b;
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.3);
}

.custom-popup-icon-badge.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1.5px solid rgba(16, 185, 129, 0.5);
    color: #10b981;
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.3);
}

.custom-popup-icon-badge.info {
    background: rgba(99, 102, 241, 0.15);
    border: 1.5px solid rgba(99, 102, 241, 0.5);
    color: #818cf8;
    box-shadow: 0 0 24px rgba(99, 102, 241, 0.3);
}

/* Titles and Messages */
.custom-popup-title {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #f8fafc;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.custom-popup-message {
    font-size: 0.95rem;
    line-height: 1.55;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    max-width: 380px;
    word-break: break-word;
}

.custom-popup-details {
    font-size: 0.85rem;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    color: #cbd5e1;
    margin-bottom: 1.25rem;
    width: 100%;
    text-align: left;
    font-family: monospace;
    white-space: pre-wrap;
    max-height: 120px;
    overflow-y: auto;
}

/* Action Buttons Container */
.custom-popup-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    width: 100%;
}

.custom-popup-btn {
    padding: 0.7rem 1.4rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 110px;
    font-family: inherit;
}

.custom-popup-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.5);
}

.custom-popup-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.custom-popup-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.custom-popup-btn-confirm {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.custom-popup-btn-confirm:hover {
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.55);
    transform: translateY(-1px);
}

.custom-popup-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.custom-popup-btn-danger:hover {
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.6);
    transform: translateY(-1px);
}

.custom-popup-btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000000;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.custom-popup-btn-warning:hover {
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.6);
    transform: translateY(-1px);
}

.custom-popup-btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.custom-popup-btn-success:hover {
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.6);
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .custom-popup-card {
        padding: 1.4rem 1.25rem;
        max-width: 95%;
        border-radius: 16px;
    }
    
    .custom-popup-actions {
        flex-direction: column-reverse;
        gap: 0.65rem;
    }
    
    .custom-popup-btn {
        width: 100%;
        padding: 0.75rem 1rem;
    }
}

/* Day Pill Buttons */
.day-pill-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.day-pill-btn:hover {
    border-color: var(--primary-indigo);
    color: #fff;
}
.day-pill-btn.active {
    background: var(--primary-indigo);
    border-color: #818cf8;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}




