/* ToFindAI - Unified Stylesheet */
/* Built for Namecheap Stellar - PHP/MySQL ready */

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

:root {
    --primary: #00b4ff;
    --primary-dark: #008ed1;
    --dark-bg: #0b0e13;
    --darker-bg: #060709;
    --card-bg: #13171f;
    --card-hover: #1a1f27;
    --border: #1e2633;
    --text: #ffffff;
    --text-muted: #cccccc;
    --text-dim: #888888;
    --success: #00ff88;
    --warning: #ffcc00;
    --danger: #ff4444;
    --radius: 12px;
    --radius-sm: 6px;
    --shadow: 0 4px 20px rgba(0, 180, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(circle at top, #10131a, var(--darker-bg));
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* Header & Navigation */
header {
    background: var(--dark-bg);
    border-bottom: 1px solid var(--border);
    padding: 0.8em 1.5em;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1em;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.brand-logo {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.brand-logo span {
    color: var(--text-dim);
    font-weight: 400;
}

.brand-tagline {
    color: var(--text-dim);
    font-size: 0.85em;
    margin-left: 0.5em;
}

nav {
    display: flex;
    align-items: center;
    gap: 1.5em;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--primary);
}

nav a.active {
    color: var(--primary);
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.8em;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 0.3em 0.6em;
}

.search-box input {
    background: none;
    border: none;
    color: var(--text);
    outline: none;
    width: 160px;
    font-size: 0.9em;
}

.search-box button {
    background: var(--primary);
    border: none;
    color: white;
    padding: 0.4em 0.8em;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
}

.btn {
    display: inline-block;
    padding: 0.6em 1.2em;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 0.95em;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--card-hover);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2em 1.5em;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4em 1em;
    background: linear-gradient(180deg, var(--dark-bg) 0%, transparent 100%);
}

.hero h1 {
    font-size: 2.8em;
    margin-bottom: 0.5em;
    background: linear-gradient(90deg, var(--text), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.2em;
    max-width: 600px;
    margin: 0 auto 2em;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5em;
    margin: 2em 0;
}

.category-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2em;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
}

.category-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.category-icon {
    font-size: 3em;
    margin-bottom: 0.5em;
}

.category-card h3 {
    color: var(--primary);
    margin-bottom: 0.5em;
}

.category-card p {
    color: var(--text-dim);
    font-size: 0.9em;
}

/* Forms */
.form-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2em;
    max-width: 800px;
    margin: 0 auto;
}

.form-section h2 {
    color: var(--primary);
    margin-bottom: 0.5em;
}

.form-section .subtitle {
    color: var(--text-muted);
    margin-bottom: 2em;
}

.form-group {
    margin-bottom: 1.5em;
}

.form-group label {
    display: block;
    margin-bottom: 0.5em;
    color: var(--primary);
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8em;
    background: var(--dark-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95em;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group small {
    color: var(--text-dim);
    font-size: 0.85em;
}

/* Multi-select styling */
select[multiple] {
    min-height: 150px;
}

select[multiple] option {
    padding: 0.5em;
}

select[multiple] option:checked {
    background: var(--primary);
    color: white;
}

/* Pricing Display */
.pricing-box {
    background: var(--dark-bg);
    border-radius: var(--radius);
    padding: 1.5em;
    margin: 1.5em 0;
    border: 1px solid var(--border);
}

.pricing-box h3 {
    color: var(--primary);
    margin-bottom: 1em;
}

.price-display {
    font-size: 2em;
    font-weight: 700;
    color: var(--success);
}

.price-breakdown {
    margin-top: 1em;
    padding-top: 1em;
    border-top: 1px solid var(--border);
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin: 0.5em 0;
}

.price-row.total {
    font-weight: 700;
    font-size: 1.1em;
    color: var(--primary);
}

.savings {
    color: var(--success);
    font-weight: 600;
}

/* Urgency Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2em;
    max-width: 500px;
    width: 90%;
    border: 1px solid var(--primary);
    text-align: center;
}

.modal h2 {
    color: var(--primary);
    margin-bottom: 1em;
}

.modal p {
    color: var(--text-muted);
    margin-bottom: 1.5em;
}

.modal-buttons {
    display: flex;
    gap: 1em;
    justify-content: center;
    flex-wrap: wrap;
}

/* Admin Panel Styles */
.admin-body {
    background: var(--dark-bg);
}

.admin-header {
    background: var(--card-bg);
    border-bottom: 2px solid var(--primary);
}

.admin-nav {
    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
}

.admin-nav a {
    padding: 0.5em 1em;
    border-radius: var(--radius-sm);
    background: var(--dark-bg);
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--primary);
    color: white;
}

.admin-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5em;
    margin-bottom: 1.5em;
    border: 1px solid var(--border);
}

.admin-card h3 {
    color: var(--primary);
    margin-bottom: 1em;
    padding-bottom: 0.5em;
    border-bottom: 1px solid var(--border);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1em;
    margin-bottom: 2em;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5em;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-number {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--text-dim);
    font-size: 0.9em;
}

/* Listing Cards */
.listing-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5em;
    margin-bottom: 1em;
    border: 1px solid var(--border);
    display: flex;
    gap: 1em;
    align-items: flex-start;
}

.listing-card.pending {
    border-left: 4px solid var(--warning);
}

.listing-card.approved {
    border-left: 4px solid var(--success);
}

.listing-card.rejected {
    border-left: 4px solid var(--danger);
}

.listing-info {
    flex: 1;
}

.listing-info h4 {
    color: var(--primary);
    margin-bottom: 0.3em;
}

.listing-meta {
    color: var(--text-dim);
    font-size: 0.9em;
}

.listing-actions {
    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
}

.btn-small {
    padding: 0.4em 0.8em;
    font-size: 0.85em;
}

.btn-success {
    background: var(--success);
    color: var(--dark-bg);
}

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

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border);
    border-radius: 26px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

input:checked + .toggle-slider {
    background: var(--primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Footer */
footer {
    background: var(--dark-bg);
    border-top: 1px solid var(--border);
    padding: 2em 1.5em;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.9em;
}

.footer-links {
    margin-bottom: 1em;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    margin: 0 0.5em;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    nav {
        width: 100%;
        justify-content: center;
    }

    .hero h1 {
        font-size: 2em;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .listing-card {
        flex-direction: column;
    }

    .modal-buttons {
        flex-direction: column;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-muted { color: var(--text-muted); }
.mb-1 { margin-bottom: 1em; }
.mb-2 { margin-bottom: 2em; }
.mt-1 { margin-top: 1em; }
.mt-2 { margin-top: 2em; }
.hidden { display: none !important; }
