/* BAVDU V0.1 — Main CSS */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #1a2e4a;
    --secondary: #c9a84c;
    --bg: #f8f9fa;
    --text: #1a1a1a;
    --radius: 6px;
    --font: 'Vazirmatn', sans-serif;
    --white: #ffffff;
    --border: #dee2e6;
    --gray: #6c757d;
    --danger: #dc3545;
    --success: #198754;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    direction: rtl;
    line-height: 1.6;
}

/* ── Layout ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.wrapper { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

/* ── Navbar ── */
.navbar {
    background: var(--primary);
    color: #fff;
    padding: 14px 0;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.navbar-brand { font-size: 1.4rem; font-weight: 700; color: var(--secondary); text-decoration: none; letter-spacing: 2px; }
.navbar-nav { display: flex; gap: 20px; list-style: none; }
.navbar-nav a { color: #e0e0e0; text-decoration: none; font-size: .9rem; transition: color .2s; }
.navbar-nav a:hover { color: var(--secondary); }

/* ── Cards ── */
.card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.card-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 20px; color: var(--primary); }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: .95rem;
    color: var(--text);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    direction: rtl;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,46,74,.12);
}
textarea.form-control { resize: vertical; min-height: 100px; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 22px;
    border: none; border-radius: var(--radius);
    font-family: var(--font); font-size: .95rem; font-weight: 500;
    cursor: pointer; text-decoration: none;
    transition: all .2s; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #0f1e32; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: #b08a30; }
.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: .85rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── Alerts ── */
.alert {
    padding: 12px 18px; border-radius: var(--radius);
    margin-bottom: 18px; font-size: .92rem;
}
.alert-success { background: #d1e7dd; color: #0a3622; border: 1px solid #a3cfbb; }
.alert-danger  { background: #f8d7da; color: #58151c; border: 1px solid #f1aeb5; }
.alert-info    { background: #cff4fc; color: #055160; border: 1px solid #9eeaf9; }

/* ── Tables ── */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { background: var(--primary); color: #fff; padding: 12px 14px; text-align: right; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); }
.table tr:hover td { background: #f5f7fa; }

/* ── Badge ── */
.badge {
    display: inline-block; padding: 3px 10px;
    border-radius: 20px; font-size: .78rem; font-weight: 600;
}
.badge-success { background: #d1e7dd; color: #0a3622; }
.badge-danger  { background: #f8d7da; color: #58151c; }
.badge-warning { background: #fff3cd; color: #664d03; }

/* ── Page Header ── */
.page-header {
    background: var(--primary); color: #fff;
    padding: 40px 0; margin-bottom: 36px;
}
.page-header h1 { font-size: 1.7rem; font-weight: 700; }
.page-header p  { opacity: .75; margin-top: 6px; }

/* ── Auth Pages ── */
.auth-wrapper {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #0f1e32 100%);
    padding: 20px;
}
.auth-box {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    width: 100%; max-width: 440px;
    box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.auth-logo {
    text-align: center; margin-bottom: 28px;
    font-size: 2rem; font-weight: 800;
    color: var(--primary); letter-spacing: 3px;
}
.auth-logo span { color: var(--secondary); }

/* ── Wizard / Steps ── */
.wizard-steps {
    display: flex; gap: 0;
    margin-bottom: 36px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}
.wizard-step {
    flex: 1; padding: 12px 8px;
    text-align: center; font-size: .82rem;
    background: #f0f2f5; color: var(--gray);
    border-left: 1px solid var(--border);
    position: relative;
}
.wizard-step:last-child { border-left: none; }
.wizard-step.active { background: var(--primary); color: #fff; font-weight: 600; }
.wizard-step.done   { background: var(--success); color: #fff; }

/* ── Template Cards ── */
.template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.template-card {
    border: 2px solid var(--border); border-radius: var(--radius);
    overflow: hidden; cursor: pointer; transition: all .2s;
}
.template-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.template-card.selected { border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(201,168,76,.25); }
.template-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.template-card-label {
    padding: 10px; text-align: center;
    font-size: .88rem; font-weight: 500;
}

/* ── Style Swatches ── */
.style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.style-swatch {
    border: 2px solid var(--border); border-radius: var(--radius);
    padding: 14px; cursor: pointer; transition: all .2s;
    text-align: center;
}
.style-swatch:hover { border-color: var(--primary); }
.style-swatch.selected { border-color: var(--secondary); }
.swatch-colors { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; }
.swatch-dot { width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); }
.swatch-name { font-size: .82rem; font-weight: 500; }

/* ── Dashboard ── */
.dashboard-grid { display: grid; grid-template-columns: 240px 1fr; gap: 28px; }
.sidebar {
    background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--border); padding: 20px;
    height: fit-content; position: sticky; top: 80px;
}
.sidebar-nav { list-style: none; }
.sidebar-nav li a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius);
    color: var(--text); text-decoration: none;
    font-size: .92rem; transition: all .2s;
}
.sidebar-nav li a:hover { background: #f0f2f5; color: var(--primary); }
.sidebar-nav li a.active { background: var(--primary); color: #fff; }

/* ── Items Grid ── */
.items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.item-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    transition: box-shadow .2s;
}
.item-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.item-card img { width: 100%; height: 180px; object-fit: cover; }
.item-card-body { padding: 14px; }
.item-card-title { font-weight: 600; margin-bottom: 6px; }
.item-card-price { color: var(--secondary); font-weight: 700; margin-bottom: 8px; }
.item-card-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ── Footer ── */
.footer {
    background: var(--primary); color: rgba(255,255,255,.6);
    text-align: center; padding: 18px;
    font-size: .82rem; margin-top: 60px;
}
.footer a { color: var(--secondary); text-decoration: none; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .template-grid { grid-template-columns: 1fr 1fr; }
    .style-grid { grid-template-columns: 1fr 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .table { font-size: .82rem; }
    .table th, .table td { padding: 8px 10px; }
}
@media (max-width: 480px) {
    .template-grid { grid-template-columns: 1fr; }
    .auth-box { padding: 24px 18px; }
}
