/* =========================================================================
   AutoRecode.PRO — Main Stylesheet
   Dark automotive theme with accent highlights
   ========================================================================= */

/* --- CSS Variables ------------------------------------------------------- */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a26;
    --bg-card-hover: #22222f;
    --bg-input: #16161f;

    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b0;
    --text-muted: #66667a;

    --accent: #e63946;
    --accent-hover: #ff4d5a;
    --accent-glow: rgba(230, 57, 70, 0.25);

    --accent2: #00b4d8;
    --accent2-glow: rgba(0, 180, 216, 0.2);

    --success: #2ecc71;
    --warning: #f39c12;
    --error: #e74c3c;
    --info: #3498db;

    --border: #2a2a3a;
    --border-light: #3a3a4c;

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;

    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Orbitron', monospace;

    --nav-height: 72px;
    --container-max: 1280px;
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }

ul { list-style: none; }

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Navbar ------------------------------------------------------------- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: background 0.3s;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.97);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.navbar-brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 1px;
}

.brand-auto { color: var(--text-primary); }
.brand-recode { color: var(--accent); }
.brand-dot { color: var(--text-muted); }
.brand-pro { color: var(--accent2); font-size: 0.8em; }

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-menu > li > a {
    display: block;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.navbar-menu > li > a:hover,
.navbar-menu > li > a.active {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.nav-admin-btn {
    background: var(--accent) !important;
    color: #fff !important;
    font-weight: 600 !important;
}

.nav-admin-btn:hover {
    background: var(--accent-hover) !important;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle i {
    font-size: 0.65em;
    margin-left: 4px;
    transition: transform 0.2s;
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s ease;
    box-shadow: var(--shadow-lg);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    transition: all 0.15s;
}

.dropdown-menu li a:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.06);
}

.dropdown-menu li a i {
    width: 20px;
    text-align: center;
    color: var(--accent);
}

/* Hamburger */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.navbar-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

/* --- Hero --------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--nav-height) + 40px) 24px 80px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, var(--accent-glow) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 80%, var(--accent2-glow) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(230, 57, 70, 0.12);
    border: 1px solid rgba(230, 57, 70, 0.25);
    color: var(--accent);
    padding: 6px 18px;
    border-radius: 40px;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 24px;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5.5vw, 4rem);
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 16px;
    line-height: 1.1;
}

.hero h1 .text-accent { color: var(--accent); }
.hero h1 .text-accent2 { color: var(--accent2); }

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 300;
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    font-family: var(--font-primary);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 28px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--text-secondary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.82rem;
}

.btn-danger {
    background: var(--error);
    color: #fff;
}

.btn-danger:hover {
    background: #c0392b;
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #27ae60;
    color: #fff;
}

/* --- Section ------------------------------------------------------------ */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    letter-spacing: 1px;
}

.section-header p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 8px auto 0;
}

.section-divider {
    width: 60px;
    height: 3px;
    background: var(--accent);
    border-radius: 3px;
    margin: 16px auto 0;
}

/* --- Brand Cards (Home) ------------------------------------------------- */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.brand-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.brand-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--card-accent, var(--accent));
    opacity: 0;
    transition: opacity 0.3s;
}

.brand-card:hover {
    border-color: var(--card-accent, var(--accent));
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.brand-card:hover::before {
    opacity: 1;
}

.brand-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
    color: #fff;
    background: var(--card-accent, var(--accent));
}

.brand-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.brand-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.brand-card .btn {
    width: 100%;
    justify-content: center;
}

/* --- Brand Detail Page -------------------------------------------------- */
.brand-hero {
    position: relative;
    padding: calc(var(--nav-height) + 60px) 24px 60px;
    text-align: center;
    overflow: hidden;
}

.brand-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 50% at 50% 20%, var(--brand-glow, var(--accent-glow)) 0%, transparent 60%);
    pointer-events: none;
}

.brand-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.brand-hero .brand-icon-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2rem;
    color: #fff;
    background: var(--brand-color, var(--accent));
}

.brand-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3rem);
    letter-spacing: 2px;
}

.brand-hero .hero-subtitle {
    margin-top: 12px;
}

.brand-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

.brand-content-body {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    line-height: 1.9;
}

.brand-content-body p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.brand-content-body ul {
    list-style: none;
    margin: 16px 0;
}

.brand-content-body ul li {
    padding: 10px 0 10px 28px;
    position: relative;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.brand-content-body ul li:last-child {
    border-bottom: none;
}

.brand-content-body ul li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.8rem;
}

.brand-content-body ol {
    margin: 16px 0;
    padding-left: 24px;
    list-style: decimal;
}

.brand-content-body ol li {
    padding: 8px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.brand-content-body ol li:last-child {
    border-bottom: none;
}

.brand-content-body ol li::marker {
    color: var(--accent2);
    font-weight: 700;
}

/* --- Gallery ------------------------------------------------------------ */
.gallery-filters {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.gallery-filter-btn {
    padding: 8px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 40px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    font-family: var(--font-primary);
}

.gallery-filter-btn:hover,
.gallery-filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay span {
    color: #fff;
    font-weight: 500;
    font-size: 0.9rem;
}

.gallery-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.gallery-empty i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: var(--radius);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 2rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

/* --- Contact ------------------------------------------------------------ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-info-card i {
    font-size: 1.4rem;
    color: var(--accent);
    margin-top: 4px;
}

.contact-info-card h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.contact-info-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.form-group label .required {
    color: var(--accent);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: var(--font-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea.form-control {
    resize: vertical;
    min-height: 140px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
}

/* --- Flash Messages ----------------------------------------------------- */
.flash-container {
    position: fixed;
    top: calc(var(--nav-height) + 12px);
    right: 20px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 420px;
    width: 100%;
}

.flash {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.88rem;
    font-weight: 500;
    animation: flashIn 0.3s ease;
    box-shadow: var(--shadow);
}

.flash-success { background: #1a3a25; border: 1px solid #2ecc71; color: #2ecc71; }
.flash-error   { background: #3a1a1a; border: 1px solid #e74c3c; color: #e74c3c; }
.flash-info    { background: #1a2a3a; border: 1px solid #3498db; color: #3498db; }
.flash-warning { background: #3a2a1a; border: 1px solid #f39c12; color: #f39c12; }

.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0.7;
    line-height: 1;
}

.flash-close:hover { opacity: 1; }

@keyframes flashIn {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* --- Footer ------------------------------------------------------------- */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 60px 0 0;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.7;
}

.footer-col h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: var(--text-muted);
    font-size: 0.88rem;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: var(--accent);
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.footer-col p i {
    color: var(--accent);
    width: 20px;
    margin-right: 6px;
}

.footer-bottom {
    text-align: center;
    padding: 24px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* --- Admin -------------------------------------------------------------- */
.admin-layout {
    display: flex;
    min-height: 100vh;
    padding-top: var(--nav-height);
}

.admin-sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 24px 0;
    position: fixed;
    top: var(--nav-height);
    bottom: 0;
    overflow-y: auto;
}

.admin-sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.admin-sidebar-menu li a:hover,
.admin-sidebar-menu li a.active {
    color: var(--text-primary);
    background: rgba(255,255,255,0.03);
    border-left-color: var(--accent);
}

.admin-sidebar-menu li a i {
    width: 20px;
    text-align: center;
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-header h1 {
    font-size: 1.6rem;
    font-family: var(--font-display);
    letter-spacing: 1px;
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    flex-shrink: 0;
}

.stat-card-info h3 {
    font-size: 1.6rem;
    margin-bottom: 2px;
}

.stat-card-info p {
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* Admin table */
.admin-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    padding: 14px 18px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border);
}

.admin-table td {
    padding: 14px 18px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: rgba(255,255,255,0.02);
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success { background: rgba(46,204,113,0.15); color: var(--success); }
.badge-warning { background: rgba(243,156,18,0.15); color: var(--warning); }
.badge-danger  { background: rgba(231,76,60,0.15);  color: var(--error); }
.badge-info    { background: rgba(52,152,219,0.15);  color: var(--info); }

/* Admin form card */
.admin-form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 800px;
}

/* Admin gallery grid */
.admin-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.admin-gallery-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.admin-gallery-item img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.admin-gallery-item-info {
    padding: 12px;
}

.admin-gallery-item-info p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-gallery-item-actions {
    display: flex;
    gap: 6px;
}

.admin-gallery-item-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 6px 10px;
    font-size: 0.75rem;
}

/* Admin login */
.admin-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.admin-login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
}

.admin-login-card h1 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.admin-login-card p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 32px;
}

.admin-login-card .form-group {
    text-align: left;
}

.admin-login-card .btn {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
}

/* --- Misc --------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.hidden { display: none !important; }

/* --- Services Grid ------------------------------------------------------ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: all 0.3s ease;
    position: relative;
}

.service-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.service-card--highlight {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(230, 57, 70, 0.04) 100%);
}

.service-card--highlight::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.service-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.7;
}

/* --- RemoteBox Steps ---------------------------------------------------- */
.remotebox-section {
    position: relative;
    overflow: hidden;
}

.remotebox-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% 50%, rgba(0, 180, 216, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.remotebox-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.remotebox-step {
    flex: 1;
    max-width: 260px;
    text-align: center;
    padding: 32px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
    transition: all 0.3s;
}

.remotebox-step:hover {
    border-color: var(--accent2);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.step-number {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    background: var(--accent2);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-display);
}

.step-icon {
    font-size: 2rem;
    color: var(--accent2);
    margin-bottom: 16px;
}

.remotebox-step h4 {
    font-size: 1rem;
    margin-bottom: 10px;
}

.remotebox-step p {
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.7;
}

.remotebox-step-arrow {
    display: flex;
    align-items: center;
    color: var(--accent2);
    font-size: 1.2rem;
    opacity: 0.5;
    margin-top: 80px;
    flex-shrink: 0;
}

/* --- Shop CTA Card ------------------------------------------------------ */
.shop-cta-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(230, 57, 70, 0.06) 100%);
    border: 1px solid var(--accent);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.shop-cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 0%, var(--accent-glow) 0%, transparent 60%);
    pointer-events: none;
}

.shop-cta-content {
    position: relative;
    z-index: 2;
}

.shop-cta-icon {
    width: 72px;
    height: 72px;
    background: rgba(230, 57, 70, 0.12);
    border: 1px solid rgba(230, 57, 70, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: var(--accent);
}

.shop-cta-card h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.shop-cta-card p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 28px;
    font-size: 1rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1rem;
}

/* --- Nav Shop Button ---------------------------------------------------- */
.nav-shop-btn {
    background: rgba(230, 57, 70, 0.1) !important;
    border: 1px solid rgba(230, 57, 70, 0.3) !important;
    color: var(--accent) !important;
    font-weight: 600 !important;
}

.nav-shop-btn:hover {
    background: var(--accent) !important;
    color: #fff !important;
}

/* upload area */
.upload-area {
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    margin-bottom: 32px;
    transition: border-color 0.2s;
}

.upload-area:hover {
    border-color: var(--accent);
}

.upload-area i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.upload-area p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Ticket detail */
.ticket-detail {
    max-width: 800px;
}

.ticket-message {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.ticket-message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 12px;
    flex-wrap: wrap;
}

.ticket-message-header strong {
    color: var(--text-primary);
}

.ticket-message-header time {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.ticket-message p {
    color: var(--text-secondary);
    line-height: 1.8;
    white-space: pre-wrap;
}

.ticket-reply {
    background: rgba(0, 180, 216, 0.06);
    border-color: rgba(0, 180, 216, 0.2);
}

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .remotebox-steps {
        flex-wrap: wrap;
        gap: 20px;
    }
    .remotebox-step {
        flex: 1 1 40%;
    }
    .remotebox-step-arrow {
        display: none;
    }
}

@media (max-width: 768px) {
    .navbar-toggle {
        display: flex;
    }

    .navbar-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0; right: 0; bottom: 0;
        background: var(--bg-primary);
        flex-direction: column;
        align-items: stretch;
        padding: 24px;
        gap: 4px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .navbar-menu.open {
        transform: translateX(0);
    }

    .navbar-menu > li > a {
        padding: 14px 16px;
        font-size: 1rem;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(255,255,255,0.03);
        border: none;
        box-shadow: none;
        margin-top: 4px;
        border-radius: var(--radius-sm);
    }

    .hero { min-height: 70vh; }

    .brands-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .remotebox-steps {
        flex-direction: column;
        align-items: center;
    }

    .remotebox-step {
        max-width: 100%;
        width: 100%;
    }

    .remotebox-step-arrow {
        margin-top: 0;
        transform: rotate(90deg);
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* Admin responsive */
    .admin-sidebar {
        display: none;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Cooperation Form --------------------------------------------------- */
.cooperation-form-wrap {
    max-width: 820px;
    margin: 0 auto;
}

/* Brand checkbox cards */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.checkbox-card {
    cursor: pointer;
}

.checkbox-card input[type="checkbox"] {
    display: none;
}

.checkbox-card-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.checkbox-card-inner i {
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: color 0.2s;
    width: 22px;
    text-align: center;
}

.checkbox-card input:checked + .checkbox-card-inner {
    border-color: var(--success);
    background: rgba(46, 204, 113, 0.06);
    color: var(--text-primary);
    box-shadow: 0 0 0 1px var(--success);
}

.checkbox-card input:checked + .checkbox-card-inner i {
    color: var(--success);
}

.checkbox-card:hover .checkbox-card-inner {
    border-color: var(--border-light);
}

/* Cooperation type checkbox list */
.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.checkbox-item:hover {
    border-color: var(--border-light);
    color: var(--text-primary);
}

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    display: none;
}

.checkbox-item input:checked ~ span:last-child {
    color: var(--text-primary);
}

.checkbox-item:has(input:checked) {
    border-color: var(--success);
    background: rgba(46, 204, 113, 0.06);
    color: var(--text-primary);
    box-shadow: 0 0 0 1px var(--success);
}

/* Radio group  */
.radio-group {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.2s;
    flex: 1;
    justify-content: center;
}

.radio-item:hover {
    border-color: var(--border-light);
}

.radio-item input[type="radio"] {
    display: none;
}

.radio-custom {
    display: none;
}

.radio-item input:checked ~ span:last-child {
    color: var(--text-primary);
}

.radio-item:has(input:checked) {
    border-color: var(--success);
    background: rgba(46, 204, 113, 0.06);
    color: var(--text-primary);
    box-shadow: 0 0 0 1px var(--success);
}

/* Devices dynamic list */
.devices-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.devices-input-row .form-control {
    flex: 1;
}

.devices-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.device-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    animation: deviceIn 0.25s ease;
}

@keyframes deviceIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.device-name {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.device-actions {
    display: flex;
    gap: 6px;
}

.device-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.15s;
    font-size: 0.8rem;
}

.device-edit:hover {
    background: rgba(0, 180, 216, 0.12);
    color: var(--accent2);
}

.device-remove:hover {
    background: rgba(231, 76, 60, 0.12);
    color: var(--error);
}

/* Info note */
.coop-info-note {
    text-align: center;
    margin-top: 20px;
    padding: 16px;
    background: rgba(0, 180, 216, 0.06);
    border: 1px solid rgba(0, 180, 216, 0.15);
    border-radius: var(--radius-sm);
    color: var(--accent2);
    font-size: 0.88rem;
}

.coop-info-note i {
    margin-right: 6px;
}

@media (max-width: 768px) {
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
    .radio-group {
        flex-direction: column;
    }
}

/* ---- Language switcher ---- */
.lang-switcher {
    margin-left: 8px;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    background: var(--bg-card);
    transition: all 0.25s;
    text-decoration: none;
    white-space: nowrap;
}

.lang-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(230, 57, 70, 0.08);
}

@media (max-width: 768px) {
    .lang-switcher {
        margin-left: 0;
        margin-top: 8px;
    }
}
