/* ================================================================
   Script Oferte  -  Modern UI Stylesheet
   ================================================================ */

/* --- Design tokens --- */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-soft: rgba(99,102,241,.08);
    --primary-glow: rgba(99,102,241,.25);
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --success: #10b981;
    --warning: #f59e0b;
    --bg: #f1f5f9;
    --surface: #ffffff;
    --card-bg: #ffffff;
    --nav-bg: #0f172a;
    --nav-text: #cbd5e1;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,.12);
    --transition: .2s cubic-bezier(.4,0,.2,1);
}

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

body {
    font-family: 'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* === Navbar === */
.navbar {
    background: var(--nav-bg);
    color: var(--nav-text);
    padding: 0 2rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.brand {
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: -.02em;
    display: flex;
    align-items: center;
    gap: .6rem;
    color: white;
    text-decoration: none;
}
.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    background: linear-gradient(135deg,var(--primary),#a78bfa);
    border-radius: 9px;
    font-size: .95rem;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: .25rem;
}
.nav-links a {
    color: var(--nav-text);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 500;
    padding: .45rem .9rem;
    border-radius: 8px;
    transition: background var(--transition), color var(--transition);
}
.nav-links a:hover { background: rgba(255,255,255,.08); color: white; }
.nav-links a.active { background: rgba(255,255,255,.12); color: white; }
.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-left: .5rem;
    padding: .4rem .85rem;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    color: var(--nav-text);
    font-size: .82rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
    background: transparent;
}
.btn-logout:hover {
    background: rgba(239,68,68,.12);
    border-color: rgba(239,68,68,.35);
    color: #fca5a5;
}

/* === Container === */
.container { max-width: 1140px; margin: 0 auto; padding: 1.75rem 1.25rem; }

/* === Page header === */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    gap: .75rem;
}
.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -.025em;
    color: var(--text);
}

/* === Cards === */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
}
.card h3 {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
}
.card-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(320px,1fr)); gap: 1rem; }

/* === Forms === */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    margin-bottom: .35rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: .55rem .85rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: .9rem;
    color: var(--text);
    background: var(--surface);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-group input:disabled {
    background: var(--bg);
    color: var(--text-muted);
    cursor: not-allowed;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.checkbox-group { display: flex; gap: 1rem; flex-wrap: wrap; }
.checkbox-group label {
    font-weight: 400;
    font-size: .88rem;
    display: flex;
    align-items: center;
    gap: .35rem;
    cursor: pointer;
    color: var(--text-secondary);
}
.checkbox-group label input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: var(--primary);
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .55rem 1.15rem;
    border: none;
    border-radius: var(--radius);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: 1.4;
}
.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 1px 3px rgba(99,102,241,.3);
}
.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(99,102,241,.35);
    transform: translateY(-1px);
}
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: var(--danger-hover); }
.btn-success { background: var(--success); color: white; }
.btn-sm { padding: .35rem .75rem; font-size: .8rem; }
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover {
    border-color: var(--border-hover);
    background: var(--bg);
    color: var(--text);
}
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: .35rem .65rem;
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

/* === Alerts === */
.alert { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .88rem; font-weight: 500; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* === Pagination === */
.pagination { display: flex; gap: .35rem; justify-content: center; margin-top: 1.75rem; }
.pagination a, .pagination span {
    padding: .4rem .8rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: .85rem;
    font-weight: 500;
    transition: all var(--transition);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.pagination .active { background: var(--primary); color: white; border-color: var(--primary); }

/* === Modal overlay === */
.modal-overlay {
    display: none;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15,23,42,.55);
    backdrop-filter: blur(4px);
    z-index: 100;
    align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 520px;
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.modal h2 { margin-bottom: 1rem; font-size: 1.15rem; font-weight: 700; }

/* === Auth page === */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nav-bg);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(99,102,241,.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(167,139,250,.1) 0%, transparent 50%);
}
.auth-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 60px rgba(0,0,0,.25);
}
.auth-card h1 { text-align: center; margin-bottom: .25rem; font-size: 1.35rem; }
.auth-card .subtitle { text-align: center; color: var(--text-muted); margin-bottom: 1.5rem; font-size: .88rem; }
.auth-tabs { display: flex; margin-bottom: 1.5rem; background: var(--bg); border-radius: var(--radius); padding: 3px; }
.auth-tabs button {
    flex: 1; padding: .5rem; border: none; background: none; font-size: .88rem;
    font-weight: 600; cursor: pointer; color: var(--text-muted);
    border-radius: calc(var(--radius) - 2px); transition: all var(--transition);
}
.auth-tabs button.active { color: var(--primary); background: white; box-shadow: var(--shadow-sm); }

/* === Section title === */
.section-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* === Badge base === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: .7rem;
    padding: 3px 9px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
}
.badge-site { background: rgba(0,0,0,.7); color: white; font-size: .65rem; padding: 2px 8px; border-radius: 4px; font-weight: 600; text-transform: uppercase; }
.badge-resigilat { display: inline-block; background: #f97316; color: white; font-size: .65rem; padding: 2px 6px; border-radius: 4px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.badge-genius { display: inline-block; background: #7c3aed; color: white; font-size: .65rem; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.badge-shipping { display: inline-block; background: var(--success); color: white; font-size: .65rem; padding: 2px 6px; border-radius: 4px; font-weight: 600; }

/* === Filter item compat === */
.filter-item { display: flex; justify-content: space-between; align-items: center; }
.filter-item .actions { display: flex; gap: .5rem; }

/* === Utility === */
[x-cloak] { display: none !important; }
