:root {
    --bg-dark: #030305;
    --bg-card: #0a0a0c;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --brand-primary: #f56e0f;
    --brand-gradient: linear-gradient(135deg, #f56e0f 0%, #ea580c 100%);
    --border-color: rgba(255, 255, 255, 0.1);
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand i {
    color: var(--brand-primary);
}

.dot {
    color: var(--brand-primary);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-item:hover,
.nav-item.active {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-item.active {
    border-left: 3px solid var(--brand-primary);
}

.status-indicator {
    padding: 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    color: #22c55e;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 10px #22c55e;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem 3rem;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
}

.search-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.5rem;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 300px;
    color: var(--text-secondary);
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    outline: none;
    width: 100%;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 20px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-value.highlight {
    color: var(--brand-primary);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Inquiry Grid */
.inquiry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.inquiry-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.inquiry-card:hover {
    border-color: rgba(245, 110, 15, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.inquiry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.inquiry-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.inquiry-email {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.time-badge {
    font-size: 0.75rem;
    color: var(--brand-primary);
    background: rgba(245, 110, 15, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    font-family: monospace;
}

.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.badge.budget {
    border-color: rgba(245, 110, 15, 0.2);
    color: #ffdce0;
}

.budget-starter {
    background: rgba(34, 197, 94, 0.1) !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
    color: #4ade80 !important;
}

.budget-business {
    background: rgba(59, 130, 246, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
    color: #60a5fa !important;
}

.budget-ecomm {
    background: rgba(168, 85, 247, 0.1) !important;
    border-color: rgba(168, 85, 247, 0.3) !important;
    color: #c084fc !important;
}

.budget-enterprise {
    background: rgba(245, 158, 11, 0.1) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
    color: #fbbf24 !important;
}

.project-badge {
    background: #000;
}

.message-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #e4e4e7;
    border: 1px solid var(--border-color);
}

.card-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.btn {
    flex: 1;
    padding: 0.8rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--brand-primary);
    color: white;
}

.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 15px rgba(245, 110, 15, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: var(--text-secondary);
}

.loading-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Delete Button */
.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    width: 40px;
    flex: none;
}

.btn-delete:hover {
    background: #ef4444;
    color: white;
}

/* --- LOGIN OVERLAY --- */
.login-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.brand-large {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.input-group {
    position: relative;
    margin-bottom: 1rem;
}

.input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.input-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    padding: 1rem 1rem 1rem 2.8rem;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.input-group input:focus {
    border-color: var(--brand-primary);
    background: rgba(245, 110, 15, 0.05);
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    margin-top: 1rem;
}

.login-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 1rem;
    min-height: 1.25em;
}


/* --- MOBILE SPECIFIC --- */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.brand-mobile {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    justify-content: space-around;
    z-index: 100;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.7rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.mobile-nav-item i {
    font-size: 1.2rem;
}

.mobile-nav-item.active {
    color: var(--brand-primary);
}

.mobile-search-container {
    display: none;
    margin-bottom: 1.5rem;
}

.mobile-header-title {
    display: none;
    margin-bottom: 1.5rem;
}

.mobile-header-title h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 768px) {
    .sidebar {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem;
        /* Increased padding */
        padding-bottom: 90px;
        background: var(--bg-dark);
        min-height: 100vh;
    }

    .mobile-header {
        display: flex;
        padding: 0;
        margin-bottom: 2rem;
        border-bottom: none;
    }

    .brand-mobile {
        font-size: 1.5rem;
    }

    .mobile-nav {
        display: flex;
        background: rgba(10, 10, 12, 0.85);
        /* More transparent */
        backdrop-filter: blur(20px);
        /* Heavier blur */
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding: 0.8rem 1.5rem;
        /* Larger padding */
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    }

    .mobile-nav-item i {
        font-size: 1.4rem;
        /* Larger icons */
        margin-bottom: 2px;
    }

    .mobile-nav-item span {
        font-size: 0.7rem;
        font-weight: 500;
    }

    .top-bar.desktop-only {
        display: none;
    }

    .mobile-search-container {
        display: block;
        position: sticky;
        top: 0;
        z-index: 50;
        background: var(--bg-dark);
        padding-bottom: 1rem;
        padding-top: 0.5rem;
    }

    .mobile-header-title {
        display: block;
        margin-bottom: 2rem;
    }

    .mobile-header-title h2 {
        font-size: 2rem;
        font-weight: 800;
        background: linear-gradient(to right, #fff, #a1a1aa);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .search-bar.mobile-search {
        width: 100%;
        background: var(--bg-card);
        padding: 1rem 1.5rem;
        /* Taller search bar */
        border-radius: 16px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        /* 2 columns for stats */
        gap: 1rem;
        margin-bottom: 2.5rem;
    }

    .stat-card {
        padding: 1.25rem;
        border-radius: 18px;
        background: linear-gradient(145deg, var(--bg-card), rgba(255, 255, 255, 0.02));
    }

    .stat-value {
        font-size: 2rem;
    }

    /* Card Improvements */
    .inquiry-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .inquiry-card {
        padding: 1.5rem;
        border-radius: 20px;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }

    .inquiry-header {
        flex-direction: column;
        gap: 0.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .inquiry-name {
        font-size: 1.3rem;
        /* Larger */
    }

    .inquiry-email {
        font-size: 0.95rem;
    }

    .time-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        align-self: flex-start;
        margin-top: 0.5rem;
    }

    .badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .message-box {
        font-size: 1rem;
        line-height: 1.6;
        padding: 1.2rem;
        background: rgba(0, 0, 0, 0.4);
    }

    .card-actions {
        flex-direction: column;
        gap: 0.8rem;
    }

    .btn {
        padding: 1rem;
        /* Larger touch target */
        font-size: 1rem;
        border-radius: 14px;
    }

    .btn-delete {
        width: 100%;
        margin-top: 0.5rem;
        background: rgba(239, 68, 68, 0.1);
        padding: 1rem;
    }
}