/* ========================================
   ROOT VARIABLES - DARK MODE (Default)
   ======================================== */
:root {
    --bg: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #22223a;
    --bg-input: #0a0a0f;
    --text: #f0f0f5;
    --text-secondary: #a0a0b8;
    --muted: #6a6a82;
    --border: #2a2a3e;
    --shadow-color: rgba(56, 189, 248, 0.15);
    --primary: #38bdf8;
    --primary-dark: #0ea5e9;
    --primary-light: #7dd3fc;
    --primary-gradient: linear-gradient(135deg, #38bdf8, #0ea5e9);
    --sell: #10b981;
    --dist: #f59e0b;
    --fran: #3b82f6;
    --radius: 12px;
    --shadow: 0 8px 32px rgba(56, 189, 248, 0.15);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-bg: rgba(10, 10, 15, 0.85);
}

/* ========================================
   LIGHT MODE VARIABLES
   ======================================== */
[data-theme="light"] {
    --bg: #f0f4f8;
    --bg-secondary: #e2e8f0;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-input: #ffffff;
    --text: #0f172a;
    --text-secondary: #475569;
    --muted: #94a3b8;
    --border: #cbd5e1;
    --shadow-color: rgba(56, 189, 248, 0.25);
    --nav-bg: rgba(255, 255, 255, 0.85);
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-light: #38bdf8;
    --primary-gradient: linear-gradient(135deg, #0ea5e9, #0284c7);
    --shadow: 0 8px 32px rgba(56, 189, 248, 0.2);
}

[data-theme="light"] .badge-sell {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

[data-theme="light"] .badge-dist {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

[data-theme="light"] .badge-fran {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

[data-theme="light"] .badge-domain {
    background: rgba(14, 165, 233, 0.15);
    color: #0284c7;
}

[data-theme="light"] .card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .card:hover {
    box-shadow: 0 8px 32px rgba(56, 189, 248, 0.2);
}

[data-theme="light"] .page-band::before {
    background: radial-gradient(ellipse at 30% 50%, rgba(14, 165, 233, 0.08), transparent 70%);
}

[data-theme="light"] .btn-lang {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
}

[data-theme="light"] .btn-lang:hover {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
}

[data-theme="light"] .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .sf input,
[data-theme="light"] .sf select,
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group select,
[data-theme="light"] .form-group textarea {
    background: var(--bg);
    border-color: var(--border);
}

[data-theme="light"] .sf input:focus,
[data-theme="light"] .sf select:focus,
[data-theme="light"] .form-group input:focus,
[data-theme="light"] .form-group select:focus,
[data-theme="light"] .form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

[data-theme="light"] .stat-num {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .alert-success {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

[data-theme="light"] .alert-error {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

[data-theme="light"] .tab:hover,
[data-theme="light"] .tab.active {
    background: rgba(14, 165, 233, 0.08);
}

/* ========================================
   RESET & BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

body.ar {
    font-family: 'Tajawal', 'Inter', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ========================================
   NAVBAR
   ======================================== */
nav {
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 24px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.logo span span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-links a {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: rgba(56, 189, 248, 0.1);
}

[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a.active {
    background: rgba(14, 165, 233, 0.08);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-lang {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-lang:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text);
}

/* ========================================
   THEME TOGGLE SWITCH
   ======================================== */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    transition: var(--transition);
    user-select: none;
}

[data-theme="light"] .theme-toggle {
    background: rgba(0, 0, 0, 0.05);
}

.theme-toggle:hover {
    border-color: var(--primary);
}

.theme-toggle input {
    display: none;
}

.toggle-track {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--bg-secondary);
    border-radius: 12px;
    transition: background 0.3s ease;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.toggle-track .toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    transition: transform 0.3s ease, background 0.3s ease;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.3);
}

.theme-toggle input:checked + .toggle-track .toggle-thumb {
    transform: translateX(20px);
    background: var(--primary);
}

.theme-toggle input:checked + .toggle-track {
    background: rgba(56, 189, 248, 0.2);
}

[data-theme="light"] .toggle-track {
    background: #e2e8f0;
}

[data-theme="light"] .toggle-track .toggle-thumb {
    background: #0ea5e9;
}

.theme-icon {
    font-size: 16px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.theme-icon.sun {
    color: #f59e0b;
}

.theme-icon.moon {
    color: #94a3b8;
}

.theme-toggle:hover .theme-icon {
    transform: scale(1.1);
}

.btn-cta {
    background: var(--primary-gradient);
    color: #fff;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.btn-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
}

/* ========================================
   HERO
   ======================================== */
.hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 24px 40px;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(56, 189, 248, 0.15);
    color: var(--primary-light);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
}

[data-theme="light"] .hero-badge {
    background: rgba(14, 165, 233, 0.12);
    color: var(--primary-dark);
}

.hero h1 {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
    max-width: 800px;
    margin: 0 auto 16px;
}

.hero h1 span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero-p {
    background: var(--primary-gradient);
    color: #fff;
    padding: 12px 32px;
    border-radius: 10px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-hero-p:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 24px rgba(56, 189, 248, 0.35);
}

.btn-hero-o {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    padding: 12px 32px;
    border-radius: 10px;
    font-weight: 600;
    border: 1px solid var(--border);
    transition: var(--transition);
}

[data-theme="light"] .btn-hero-o {
    background: rgba(0, 0, 0, 0.04);
}

.btn-hero-o:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
    border-color: var(--primary);
}

[data-theme="light"] .btn-hero-o:hover {
    background: rgba(0, 0, 0, 0.08);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 24px;
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.stat-num {
    font-size: 28px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: var(--muted);
}

/* ========================================
   SEARCH SECTION
   ======================================== */
.search-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 40px;
}

.search-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.sf {
    flex: 1;
    min-width: 140px;
}

.sf label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.sf input,
.sf select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.sf input:focus,
.sf select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.sf input::placeholder {
    color: var(--muted);
}

.btn-search {
    padding: 10px 28px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    white-space: nowrap;
}

.btn-search:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
}

.btn-secondary {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

/* ========================================
   SECTION
   ======================================== */
.section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
}

.section-title span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tab-filters {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.tab {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.tab:hover,
.tab.active {
    color: var(--text);
    background: rgba(56, 189, 248, 0.1);
}

/* ========================================
   GRID
   ======================================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* ========================================
   CARD
   ======================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.card a {
    display: contents;
}

.card-img {
    height: 160px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body {
    padding: 16px 18px 20px;
}

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.card-name {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.3;
    flex: 1;
}

.badge {
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-sell {
    background: rgba(16, 185, 129, 0.15);
    color: var(--sell);
}

.badge-dist {
    background: rgba(245, 158, 11, 0.15);
    color: var(--dist);
}

.badge-fran {
    background: rgba(59, 130, 246, 0.15);
    color: var(--fran);
}

.badge-domain {
    background: rgba(56, 189, 248, 0.15);
    color: var(--primary-light);
}

.card-meta {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

.card-price {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.card-price small {
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
}

.btn-details {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-light);
    transition: var(--transition);
}

.card:hover .btn-details {
    color: var(--primary);
}

/* ========================================
   PAGE BAND
   ======================================== */
.page-band {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 40px 24px;
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.page-band::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(56, 189, 248, 0.05), transparent 70%);
    pointer-events: none;
}

.page-band-inner {
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.page-band h1 {
    font-size: 32px;
    font-weight: 700;
}

.page-band p {
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ========================================
   DETAIL
   ======================================== */
.detail-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.detail-hero {
    display: flex;
    gap: 24px;
    padding: 32px 32px 24px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.detail-logo {
    width: 120px;
    height: 120px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid rgba(56, 189, 248, 0.2);
    transition: background 0.3s ease;
}

.detail-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info {
    flex: 1;
    min-width: 200px;
}

.detail-name {
    font-size: 28px;
    font-weight: 700;
}

.detail-sub {
    color: var(--text-secondary);
    font-size: 15px;
}

.detail-badges {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.detail-body {
    padding: 24px 32px 32px;
}

.detail-desc {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.7;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 28px;
}

.info-table tr {
    border-bottom: 1px solid var(--border);
}

.info-table td {
    padding: 10px 0;
    font-size: 14px;
}

.info-table td:first-child {
    color: var(--muted);
    width: 180px;
    font-weight: 500;
}

.info-table td:last-child {
    color: var(--text);
    font-weight: 500;
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.price-label {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
}

.price-big {
    font-size: 32px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-inquire {
    background: var(--primary-gradient);
    color: #fff;
    padding: 12px 32px;
    border-radius: 10px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-inquire:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 24px rgba(56, 189, 248, 0.35);
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 32px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--text);
}

.page-btn.current {
    background: var(--primary-gradient);
    border-color: var(--primary);
    color: #fff;
}

/* ========================================
   HOW IT WORKS
   ======================================== */
.how-section {
    background: var(--bg-secondary);
    padding: 60px 24px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.how-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.how-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
}

.how-title span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}

.step {
    text-align: center;
}

.step-num {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    margin: 0 auto 12px;
    color: #fff;
}

.step h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.step p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ========================================
   CONTACT
   ======================================== */
.contact-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.contact-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 40px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.contact-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.contact-card>p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--sell);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

/* ========================================
   FILTER BAR
   ======================================== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 20px;
}

.filter-bar .sf {
    flex: 1;
    min-width: 140px;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 48px 24px 24px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.footer-logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.footer-logo-text {
    font-weight: 700;
    font-size: 18px;
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 300px;
    line-height: 1.7;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    margin-bottom: 12px;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 4px 0;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    max-width: 1280px;
    margin: 32px auto 0;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--muted);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .nav-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 0;
        gap: 8px;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-right {
        margin-left: auto;
    }

    .hero {
        padding: 32px 16px 24px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .detail-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .detail-logo {
        width: 100px;
        height: 100px;
    }

    .detail-body {
        padding: 16px;
    }

    .info-table td:first-child {
        width: 100px;
    }

    .contact-card {
        padding: 24px 16px;
    }

    .search-card {
        flex-direction: column;
        align-items: stretch;
    }

    .sf {
        min-width: 100%;
    }

    .price-row {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .btn-inquire {
        text-align: center;
    }

    .grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        grid-template-columns: 1fr 1fr;
    }

    .section-title {
        font-size: 22px;
    }

    .detail-name {
        font-size: 22px;
    }

    .price-big {
        font-size: 24px;
    }
}

/* ========================================
   RTL SUPPORT
   ======================================== */
[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

[dir="rtl"] .card-top {
    flex-direction: row-reverse;
}

[dir="rtl"] .detail-hero {
    flex-direction: row-reverse;
}

[dir="rtl"] .footer-grid {
    direction: rtl;
}

[dir="rtl"] .theme-toggle input:checked + .toggle-track .toggle-thumb {
    transform: translateX(-20px);
}

@media (max-width: 768px) {
    [dir="rtl"] .detail-hero {
        flex-direction: column;
    }
}


/* ========================================
   DASHBOARD LAYOUT
   ======================================== */
.dash-layout {
    display: flex;
    min-height: 100vh;
}

/* ── SIDEBAR ── */
.dash-sidebar {
    width: 240px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
    padding: 20px 0;
}

.dash-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px 20px;
    font-weight: 700;
    font-size: 18px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.dash-sidebar-logo .logo-icon {
    width: 34px;
    height: 34px;
    background: var(--primary-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.dash-sidebar-logo span {
    color: var(--text);
}

.dash-nav {
    flex: 1;
    padding: 0 12px;
}

.dash-nav-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    padding: 8px 12px 4px;
    margin-top: 8px;
}

.dash-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
}

.dash-nav a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.dash-nav a.active {
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary);
}

.dash-nav a .nav-icon {
    font-size: 16px;
    width: 24px;
    text-align: center;
}

.dash-sidebar-footer {
    padding: 16px 20px 0;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.dash-sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.dash-sidebar-footer a:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* ── MAIN CONTENT ── */
.dash-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.dash-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    flex-wrap: wrap;
    gap: 12px;
}

.dash-topbar-title {
    font-size: 20px;
    font-weight: 700;
}

.dash-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-badge {
    background: rgba(255, 255, 255, 0.06);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.dash-content {
    padding: 24px 32px;
    flex: 1;
}

/* ── STAT CARDS ── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--primary);
}

.stat-card-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.stat-card-val {
    font-size: 32px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-card-sub {
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}

/* ── DASH CARDS ── */
.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
}

.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 8px;
}

.dash-card-title {
    font-size: 16px;
    font-weight: 600;
}

.dash-card-link {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
    transition: var(--transition);
}

.dash-card-link:hover {
    color: var(--primary-light);
}

/* ── DASH TABLES ── */
.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.dash-table thead {
    background: var(--bg-secondary);
}

.dash-table th {
    padding: 10px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.dash-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.dash-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.dash-table .badge {
    font-size: 10px;
    padding: 2px 10px;
}

/* ── ACTION BUTTONS ── */
.t-actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-view {
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary);
}

.btn-view:hover {
    background: rgba(56, 189, 248, 0.2);
}

.btn-edit {
    background: rgba(245, 158, 11, 0.12);
    color: var(--dist);
}

.btn-edit:hover {
    background: rgba(245, 158, 11, 0.2);
}

.btn-del {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.btn-del:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ── FORM STYLES ── */
.dash-form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 900px;
}

.section-sep {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    margin-top: 24px;
}

.section-sep:first-of-type {
    margin-top: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 0;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    color: var(--text-secondary);
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

/* ── BUTTONS ── */
.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ── CONFIRM DELETE ── */
.confirm-card {
    max-width: 500px;
    margin: 60px auto;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 32px;
}

.confirm-card h2 {
    font-size: 24px;
    font-weight: 700;
    color: #ef4444;
}

.confirm-card p {
    color: var(--text-secondary);
    font-size: 16px;
    margin: 12px 0 24px;
}

/* ── MESSAGES ── */
.messages-container {
    margin-bottom: 20px;
}

.msg {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.msg-success {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.msg-error {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.msg-info {
    background: rgba(56, 189, 248, 0.12);
    color: var(--primary);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

/* ── TOGGLE SWITCH ── */
.toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border);
    transition: var(--transition);
    border-radius: 22px;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: var(--text);
    transition: var(--transition);
    border-radius: 50%;
}

.toggle input:checked+.toggle-slider {
    background: var(--primary);
}

.toggle input:checked+.toggle-slider:before {
    transform: translateX(18px);
}

/* ── DASHBOARD RESPONSIVE ── */
@media (max-width: 992px) {
    .dash-sidebar {
        width: 60px;
        padding: 12px 0;
    }

    .dash-sidebar-logo span,
    .dash-nav a span:not(.nav-icon),
    .dash-nav-label,
    .dash-sidebar-footer a span:not(:first-child) {
        display: none;
    }

    .dash-nav a {
        justify-content: center;
        padding: 10px;
    }

    .dash-nav a .nav-icon {
        font-size: 20px;
        width: auto;
    }

    .dash-sidebar-footer a {
        justify-content: center;
        padding: 10px;
    }

    .dash-content {
        padding: 16px;
    }

    .dash-topbar {
        padding: 12px 16px;
    }

    .dash-topbar-title {
        font-size: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .dash-form-card {
        padding: 16px;
    }
}

@media (max-width: 600px) {
    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dash-table {
        font-size: 12px;
    }

    .dash-table th,
    .dash-table td {
        padding: 6px 8px;
    }

    .dash-table .badge {
        font-size: 9px;
        padding: 1px 6px;
    }

    .t-actions .btn-sm {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* ── LIGHT THEME OVERRIDES ── */
[data-theme="light"] .dash-sidebar {
    background: #ffffff;
    border-right-color: #e2e8f0;
}

[data-theme="light"] .dash-topbar {
    background: #ffffff;
    border-bottom-color: #e2e8f0;
}

[data-theme="light"] .dash-card {
    background: #ffffff;
}

[data-theme="light"] .dash-table thead {
    background: #f1f5f9;
}

[data-theme="light"] .dash-table tbody tr:hover {
    background: #f8fafc;
}

[data-theme="light"] .stat-card {
    background: #ffffff;
}

[data-theme="light"] .dash-form-card {
    background: #ffffff;
}

[data-theme="light"] .dash-nav a:hover {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .dash-nav a.active {
    background: rgba(14, 165, 233, 0.08);
}

[data-theme="light"] .dash-sidebar-footer {
    border-top-color: #e2e8f0;
}

[data-theme="light"] .confirm-card {
    background: #ffffff;
}