/* AIpha Tec - Modern Multi-Color Tech Theme */
:root {
    --primary: #0ea5e9;
    --secondary: #8b5cf6;
    --accent: #10b981;
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: #334155;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #22c55e;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0,0,0,0.25);
    --font-title: 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--secondary); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* Header — always horizontal row on desktop */
.site-header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-inner {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    height: auto;
    gap: 1rem;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.logo-text {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 800;
    color: #e2e8f0;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.logo-text .accent, .footer-logo .accent {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav {
    flex: 1 1 auto;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
}
.nav-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    list-style: none;
    gap: 0.15rem;
    align-items: center;
    margin: 0;
    padding: 0;
}
.nav-list > li {
    display: inline-block;
    position: relative;
    flex-shrink: 0;
}
.nav-list > li > a {
    display: block;
    padding: 0.5rem 0.9rem;
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 8px;
    white-space: nowrap;
}
.nav-list > li > a:hover { color: #e2e8f0; background: #334155; }

.has-dropdown { position: relative; }
.has-dropdown .arrow { font-size: 0.7rem; opacity: 0.7; }
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    list-style: none;
    padding: 0.5rem;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s;
    z-index: 100;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown a {
    display: block;
    padding: 0.6rem 1rem;
    color: #94a3b8;
    border-radius: 6px;
    font-size: 0.9rem;
}
.dropdown a:hover { background: #334155; color: #e2e8f0; }

.header-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #e2e8f0;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
}
.btn-primary:hover { filter: brightness(1.1); color: #fff; transform: translateY(-1px); }
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; }

/* Main */
.main-content { flex: 1; padding: 2rem 0 4rem; }

/* Hero */
.hero {
    padding: 4rem 0 5rem;
    text-align: center;
    background: radial-gradient(ellipse at 50% 0%, rgba(14,165,233,0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 50%, rgba(139,92,246,0.1) 0%, transparent 50%);
}
.hero h1 {
    font-family: var(--font-title);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}
.hero h1 span {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.25s;
}
.card:hover { border-color: var(--primary); box-shadow: 0 8px 32px rgba(14,165,233,0.12); }
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.card p { color: var(--text-muted); font-size: 0.95rem; }
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-open { background: rgba(16,185,129,0.2); color: var(--accent); }
.badge-commercial { background: rgba(139,92,246,0.2); color: var(--secondary); }
.badge-service { background: rgba(14,165,233,0.2); color: var(--primary); }

/* Section */
.section { padding: 3rem 0; }
.section-title {
    font-family: var(--font-title);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.section-sub { color: var(--text-muted); margin-bottom: 2rem; }

/* Forms — explicit colors so text is never white-on-white */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    color: #e2e8f0;
}
.form-control,
input.form-control,
textarea.form-control,
select.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="date"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 0.7rem 1rem;
    background-color: #0f172a !important;
    border: 1px solid #475569 !important;
    border-radius: 8px;
    color: #f1f5f9 !important;
    -webkit-text-fill-color: #f1f5f9 !important;
    caret-color: #f1f5f9;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #0ea5e9 !important;
    box-shadow: 0 0 0 3px rgba(14,165,233,0.25);
}
.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
    opacity: 1;
}
/* Browser autofill (Chrome/Edge) — keep dark field + light text */
input.form-control:-webkit-autofill,
input.form-control:-webkit-autofill:hover,
input.form-control:-webkit-autofill:focus,
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #f1f5f9 !important;
    caret-color: #f1f5f9;
    box-shadow: 0 0 0 1000px #0f172a inset !important;
    transition: background-color 99999s ease-out;
}
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control,
select {
    cursor: pointer;
    color: #f1f5f9 !important;
    background-color: #0f172a !important;
}
select.form-control option,
select option {
    background: #1e293b;
    color: #f1f5f9;
}

.auth-box {
    max-width: 420px;
    margin: 2rem auto;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: var(--radius);
    padding: 2rem;
    color: #e2e8f0;
}
.auth-box h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #f1f5f9;
}
.auth-box p,
.auth-box label {
    color: #e2e8f0;
}
.auth-box a { color: #38bdf8; }

/* Alerts */
.alert {
    padding: 0.9rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}
.alert-success { background: rgba(34,197,94,0.15); border: 1px solid var(--success); color: var(--success); }
.alert-error { background: rgba(239,68,68,0.15); border: 1px solid var(--danger); color: var(--danger); }
.alert-info { background: rgba(14,165,233,0.15); border: 1px solid var(--primary); color: var(--primary); }

/* Tables */
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
th { color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* Footer */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 3rem 0 0;
    margin-top: auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2rem;
    padding-bottom: 2rem;
}
.footer-logo { font-size: 1.3rem; font-weight: 800; margin-bottom: 0.75rem; }
.footer-col h4 { font-size: 0.95rem; margin-bottom: 1rem; color: var(--text); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { color: var(--text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--primary); }
.footer-col p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.4rem; }
.social-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.social-links a {
    padding: 0.3rem 0.7rem;
    background: var(--bg);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.social-links a:hover { color: var(--primary); }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 1.25rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--primary); }

/* Admin */
.admin-layout { display: flex; min-height: calc(100vh - 70px); }
.admin-sidebar {
    width: 240px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 1.5rem 0;
    flex-shrink: 0;
}
.admin-sidebar a {
    display: block;
    padding: 0.7rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
    background: rgba(14,165,233,0.1);
    color: var(--primary);
    border-right: 3px solid var(--primary);
}
.admin-content { flex: 1; padding: 2rem; overflow-x: auto; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.stat-card .num { font-size: 1.75rem; font-weight: 700; color: var(--primary); }
.stat-card .label { font-size: 0.85rem; color: var(--text-muted); }

/* Editor */
.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}
.editor-toolbar button {
    padding: 0.35rem 0.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    cursor: pointer;
    font-size: 0.85rem;
}
.editor-toolbar button:hover { background: var(--bg-hover); }
.editor-area {
    min-height: 300px;
    padding: 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
    color: var(--text);
    outline: none;
}
.editor-area:focus { border-color: var(--primary); }

/* Media modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: auto;
    padding: 1.5rem;
}
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}
.media-item {
    aspect-ratio: 1;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg);
}
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; }
.media-item.selected { border-color: var(--primary); }

/* Pagination */
.pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 2rem; }
.pagination a, .pagination span {
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}
.pagination a:hover, .pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Responsive */
@media (max-width: 900px) {
    .main-nav { display: none; }
    .main-nav.open {
        display: block;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border);
        padding: 1rem;
    }
    .nav-list { flex-direction: column; align-items: stretch; }
    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding-left: 1rem;
        display: none;
    }
    .has-dropdown.open .dropdown { display: block; }
    .mobile-toggle { display: block; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); display: flex; overflow-x: auto; padding: 0.5rem; }
    .admin-sidebar a { white-space: nowrap; border-right: none; }
}

@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
    .hero { padding: 2.5rem 0 3rem; }
}
