/* Generic concesionaria theme — light, clean defaults for new tenants */

:root {
    --brand-primary: #2563eb;
    --brand-secondary: #1e293b;
    --rojo-rvm: var(--brand-primary);
    --rojo-hover: color-mix(in srgb, var(--brand-primary) 85%, black);
    --negro: var(--brand-secondary);
    --blanco: #ffffff;
    --gris-texto: #64748b;
    --bg: #f1f5f9;
    --card: #ffffff;
    --border: #e2e8f0;
    --text: #1e293b;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.1);
    --radius: 8px;
    --max-width: 1200px;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--brand-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
}

.logo-container {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.logo-container:hover {
    text-decoration: none;
}

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

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: contain;
    border: 1px solid var(--border);
    background: var(--bg);
}

.logo-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.logo-text span {
    color: var(--brand-primary);
}

.logo-slogan {
    font-size: 0.75rem;
    color: var(--gris-texto);
    margin-top: 2px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
}

.nav-item > a {
    display: block;
    padding: 0.5rem 0.85rem;
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 6px;
    text-decoration: none;
}

.nav-item > a:hover {
    background: var(--bg);
    color: var(--brand-primary);
    text-decoration: none;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 0.35rem;
    z-index: 100;
}

.nav-item:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text);
    border-radius: 4px;
    text-decoration: none;
}

.dropdown-menu a:hover {
    background: var(--bg);
    text-decoration: none;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.4rem;
    cursor: pointer;
    color: var(--text);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-modern {
    padding: 0.5rem 1rem;
    background: var(--brand-primary);
    color: white;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    border: none;
}

.btn-modern:hover {
    background: var(--rojo-hover);
    text-decoration: none;
    color: white;
}

.admin-dropdown {
    position: relative;
}

.admin-dropbtn {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text);
}

.admin-drop-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    min-width: 220px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 0.35rem;
    z-index: 200;
}

.admin-dropdown:hover .admin-drop-content,
.admin-dropdown:focus-within .admin-drop-content {
    display: block;
}

.admin-drop-content a,
.admin-logout-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.875rem;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
}

.admin-drop-content a:hover,
.admin-logout-link:hover {
    background: var(--bg);
}

.admin-divider {
    height: 1px;
    background: var(--border);
    margin: 0.35rem 0;
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem;
}

/* Footer */
footer {
    background: var(--card);
    border-top: 1px solid var(--border);
    margin-top: 3rem;
    padding: 2rem 1.5rem 1rem;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.footer-section h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.footer-section p {
    color: var(--gris-texto);
    font-size: 0.9rem;
}

.social-links a {
    display: inline-block;
    margin-right: 1rem;
    font-size: 0.875rem;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 1.5rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--gris-texto);
    font-size: 0.8rem;
}

.agency-credit a {
    color: var(--brand-primary);
}

/* Shared components */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
}

.page-header p {
    color: var(--gris-texto);
    margin-top: 0.35rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.btn-primary {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    background: var(--brand-primary);
    color: white;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--rojo-hover);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    display: inline-block;
    padding: 0.65rem 1.25rem;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--bg);
    text-decoration: none;
}

.form-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card);
    color: var(--text);
    font-size: 0.95rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 20%, transparent);
}

.help-text {
    display: block;
    font-size: 0.8rem;
    color: var(--gris-texto);
    margin-top: 0.35rem;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

/* Mobile */
@media (max-width: 900px) {
    .mobile-menu-btn {
        display: block;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card);
        border-bottom: 1px solid var(--border);
        display: none;
    }

    nav.open {
        display: block;
    }

    nav ul {
        flex-direction: column;
        padding: 0.5rem;
        gap: 0;
    }

    nav ul.active {
        display: flex;
    }

    .nav-item {
        width: 100%;
    }

    .nav-item > a {
        padding: 0.75rem;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
    }
}
