/* ==============================================
   REX BUILDERSHOP - Main Stylesheet
   ============================================== */

/* CSS Variables */
:root {
    --primary: #e67e22;
    --primary-dark: #d35400;
    --primary-light: #f39c12;
    --secondary: #2c3e50;
    --secondary-light: #34495e;
    --success: #27ae60;
    --success-light: #2ecc71;
    --danger: #e74c3c;
    --danger-dark: #c0392b;
    --warning: #f39c12;
    --info: #3498db;
    --purple: #9b59b6;
    --orange: #e67e22;
    --light: #f8f9fa;
    --dark: #2c3e50;
    --gray: #95a5a6;
    --gray-light: #ecf0f1;
    --gray-dark: #7f8c8d;
    --white: #ffffff;
    --black: #000000;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #e0e0e0;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
    --sidebar-width: 260px;
    --topbar-height: 60px;
    --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-family);
    color: var(--text);
    background: var(--light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: var(--primary); transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; font-family: inherit; }
input, select, textarea {
    font-family: inherit;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    width: 100%;
    transition: var(--transition);
    background: var(--white);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230,126,34,0.1);
}
textarea { resize: vertical; min-height: 100px; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--gray-light); }
::-webkit-scrollbar-thumb { background: var(--gray); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-dark); }

/* ==============================================
   LAYOUT
   ============================================== */

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--secondary);
    color: var(--white);
    position: fixed;
    left: 0; top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: var(--transition);
}
.sidebar-brand {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: 0;
    background: var(--secondary);
    z-index: 10;
}
.sidebar-brand .logo-icon {
    width: 36px; height: 36px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: var(--white);
}
.sidebar-brand .logo-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
}
.sidebar-brand .logo-text span { color: var(--primary); }

.sidebar-user {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-user .avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: var(--white);
    flex-shrink: 0;
}
.sidebar-user .info { flex: 1; min-width: 0; }
.sidebar-user .name {
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user .role {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    text-transform: capitalize;
}

.sidebar-nav { padding: 8px 0; }
.sidebar-nav .nav-section {
    padding: 12px 20px 4px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
}
.sidebar-nav a, .sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    transition: var(--transition);
    border-left: 3px solid transparent;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
    background: rgba(255,255,255,0.08);
    color: var(--white);
    border-left-color: var(--primary);
}
.sidebar-nav a.active { background: rgba(230,126,34,0.15); }
.sidebar-nav .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    bottom: 0;
    background: var(--secondary);
}
.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}
.sidebar-footer a:hover { color: var(--danger); }

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.menu-toggle {
    display: none;
    background: none;
    font-size: 20px;
    color: var(--text);
    padding: 4px;
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-light);
}
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .separator { color: var(--gray); }

.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-btn {
    width: 36px; height: 36px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light);
    color: var(--text);
    font-size: 14px;
    position: relative;
    transition: var(--transition);
}
.topbar-btn:hover { background: var(--gray-light); color: var(--primary); }
.topbar-btn .badge-count {
    position: absolute;
    top: -4px; right: -4px;
    background: var(--danger);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Page Content */
.page-content { flex: 1; padding: 24px; }
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.page-title { font-size: 22px; font-weight: 700; color: var(--text); }
.page-subtitle { font-size: 13px; color: var(--text-light); margin-top: 2px; }

/* ==============================================
   CARDS
   ============================================== */

.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-title { font-size: 15px; font-weight: 600; }
.card-body { padding: 20px; }
.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: var(--light);
}

/* Stat Cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.stat-icon.primary { background: rgba(230,126,34,0.1); color: var(--primary); }
.stat-icon.success { background: rgba(39,174,96,0.1); color: var(--success); }
.stat-icon.danger { background: rgba(231,76,60,0.1); color: var(--danger); }
.stat-icon.info { background: rgba(52,152,219,0.1); color: var(--info); }
.stat-icon.warning { background: rgba(243,156,18,0.1); color: var(--warning); }
.stat-icon.purple { background: rgba(155,89,182,0.1); color: var(--purple); }
.stat-content { flex: 1; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--text); }
.stat-label { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.stat-change {
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ==============================================
   BUTTONS
   ============================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-align: center;
    white-space: nowrap;
}
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); }

.btn-secondary { background: var(--secondary); color: var(--white); border-color: var(--secondary); }
.btn-secondary:hover { background: var(--secondary-light); border-color: var(--secondary-light); color: var(--white); }

.btn-success { background: var(--success); color: var(--white); border-color: var(--success); }
.btn-success:hover { background: #219a52; border-color: #219a52; color: var(--white); }

.btn-danger { background: var(--danger); color: var(--white); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-dark); border-color: var(--danger-dark); color: var(--white); }

.btn-warning { background: var(--warning); color: var(--white); border-color: var(--warning); }
.btn-warning:hover { background: #e08e0b; border-color: #e08e0b; color: var(--white); }

.btn-info { background: var(--info); color: var(--white); border-color: var(--info); }
.btn-info:hover { background: #2980b9; border-color: #2980b9; color: var(--white); }

.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--light); border-color: var(--gray); }

.btn-outline-primary { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: var(--white); }

.btn-ghost { background: transparent; color: var(--text-light); border-color: transparent; }
.btn-ghost:hover { background: var(--light); color: var(--text); }

.btn-group { display: inline-flex; gap: 0; }
.btn-group .btn { border-radius: 0; }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.btn-group .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ==============================================
   BADGES
   ============================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.badge-primary { background: rgba(230,126,34,0.12); color: var(--primary-dark); }
.badge-success { background: rgba(39,174,96,0.12); color: var(--success); }
.badge-danger { background: rgba(231,76,60,0.12); color: var(--danger); }
.badge-warning { background: rgba(243,156,18,0.12); color: #b7791f; }
.badge-info { background: rgba(52,152,219,0.12); color: var(--info); }
.badge-purple { background: rgba(155,89,182,0.12); color: var(--purple); }
.badge-orange { background: rgba(230,126,34,0.12); color: var(--orange); }
.badge-secondary { background: var(--gray-light); color: var(--gray-dark); }

/* ==============================================
   TABLES
   ============================================== */

.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table thead th {
    background: var(--light);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.data-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tbody tr:hover { background: rgba(230,126,34,0.02); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ==============================================
   FORMS
   ============================================== */

.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}
.form-label .required { color: var(--danger); }
.form-hint { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

.input-group { display: flex; }
.input-group-text {
    background: var(--light);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-light);
    white-space: nowrap;
}
.input-group input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237f8c8d' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* ==============================================
   ALERTS
   ============================================== */

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}
.alert-success { background: rgba(39,174,96,0.08); color: var(--success); border: 1px solid rgba(39,174,96,0.2); }
.alert-danger { background: rgba(231,76,60,0.08); color: var(--danger); border: 1px solid rgba(231,76,60,0.2); }
.alert-warning { background: rgba(243,156,18,0.08); color: #b7791f; border: 1px solid rgba(243,156,18,0.2); }
.alert-info { background: rgba(52,152,219,0.08); color: var(--info); border: 1px solid rgba(52,152,219,0.2); }
.alert .close { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; font-size: 18px; color: inherit; opacity: 0.5; cursor: pointer; }
.alert .close:hover { opacity: 1; }

/* ==============================================
   TABS
   ============================================== */

.tabs { display: flex; border-bottom: 2px solid var(--border); gap: 4px; margin-bottom: 20px; overflow-x: auto; }
.tab {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: var(--transition);
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ==============================================
   MODAL
   ============================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(-20px);
    transition: var(--transition);
}
.modal-overlay.active .modal { transform: translateY(0); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { background: none; font-size: 22px; color: var(--gray); padding: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); }
.modal-close:hover { background: var(--light); color: var(--danger); }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ==============================================
   PAGINATION
   ============================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 16px;
}

/* ==============================================
   PRODUCT CARDS (Customer)
   ============================================== */

.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-img {
    height: 180px;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-img .placeholder {
    font-size: 48px;
    color: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%; height: 100%;
}
.product-badge {
    position: absolute;
    top: 10px; left: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}
.product-badge.featured { background: var(--primary); color: var(--white); }
.product-badge.new { background: var(--success); color: var(--white); }
.product-badge.sale { background: var(--danger); color: var(--white); }
.product-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.product-category { font-size: 11px; color: var(--primary); font-weight: 600; text-transform: uppercase; margin-bottom: 4px; }
.product-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-vendor { font-size: 12px; color: var(--text-light); margin-bottom: 8px; }
.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.product-price { font-size: 16px; font-weight: 700; color: var(--primary); }
.product-price .old { font-size: 12px; color: var(--gray); text-decoration: line-through; font-weight: 400; margin-left: 6px; }
.product-rating { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--warning); }

/* ==============================================
   CART
   ============================================== */

.cart-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    align-items: center;
}
.cart-item-img {
    width: 80px; height: 80px;
    border-radius: var(--radius);
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--gray);
    flex-shrink: 0;
    overflow: hidden;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-details { flex: 1; }
.cart-item-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.cart-item-meta { font-size: 12px; color: var(--text-light); }
.cart-item-price { font-weight: 700; color: var(--primary); font-size: 15px; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.qty-control button { width: 32px; height: 32px; background: var(--light); font-size: 14px; display: flex; align-items: center; justify-content: center; }
.qty-control button:hover { background: var(--gray-light); }
.qty-control input { width: 44px; text-align: center; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); padding: 6px; }

/* ==============================================
   ORDER TIMELINE
   ============================================== */

.timeline { position: relative; padding-left: 30px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 9px; top: 0; bottom: 0;
    width: 2px;
    background: var(--border);
}
.timeline-item { position: relative; padding-bottom: 24px; }
.timeline-dot {
    position: absolute;
    left: -26px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}
.timeline-dot.active { background: var(--success); border-color: var(--success); color: var(--white); }
.timeline-dot.current { background: var(--primary); border-color: var(--primary); color: var(--white); }
.timeline-content { background: var(--light); padding: 12px 16px; border-radius: var(--radius); }
.timeline-title { font-weight: 600; font-size: 13px; }
.timeline-time { font-size: 11px; color: var(--text-light); margin-top: 2px; }

/* ==============================================
   CHARTS
   ============================================== */

.chart-container { position: relative; height: 300px; }

/* ==============================================
   NOTIFICATION DROPDOWN
   ============================================== */

.notif-dropdown {
    position: absolute;
    right: 0; top: calc(100% + 8px);
    width: 360px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    z-index: 200;
    display: none;
    overflow: hidden;
}
.notif-dropdown.show { display: block; }
.notif-header { padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: var(--transition); }
.notif-item:hover { background: var(--light); }
.notif-item.unread { border-left: 3px solid var(--primary); }
.notif-item-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.notif-item-msg { font-size: 12px; color: var(--text-light); line-height: 1.4; }
.notif-item-time { font-size: 11px; color: var(--gray); margin-top: 4px; }
.notif-footer { padding: 10px 16px; text-align: center; border-top: 1px solid var(--border); }
.notif-footer a { font-size: 12px; font-weight: 600; }

/* ==============================================
   AUTH PAGES (Login, Register)
   ============================================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    padding: 20px;
}
.auth-container { width: 100%; max-width: 480px; }
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo .logo-icon {
    width: 60px; height: 60px;
    background: var(--primary);
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    color: var(--white);
    margin-bottom: 12px;
}
.auth-logo h1 { color: var(--white); font-size: 24px; }
.auth-logo h1 span { color: var(--primary); }
.auth-logo p { color: rgba(255,255,255,0.7); font-size: 14px; margin-top: 4px; }

.auth-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}
.auth-card h2 { font-size: 20px; margin-bottom: 4px; text-align: center; }
.auth-card .subtitle { text-align: center; color: var(--text-light); font-size: 13px; margin-bottom: 24px; }

.auth-tabs { display: flex; gap: 0; margin-bottom: 24px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.auth-tab { flex: 1; padding: 10px; text-align: center; font-size: 13px; font-weight: 600; cursor: pointer; background: var(--light); color: var(--text-light); transition: var(--transition); }
.auth-tab.active { background: var(--primary); color: var(--white); }

.role-selector { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.role-option {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}
.role-option:hover { border-color: var(--primary-light); }
.role-option.selected { border-color: var(--primary); background: rgba(230,126,34,0.05); }
.role-option .icon { font-size: 24px; margin-bottom: 6px; }
.role-option .label { font-size: 12px; font-weight: 600; }

.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-light); }
.auth-footer a { font-weight: 600; }

/* ==============================================
   LANDING PAGE
   ============================================== */

.landing-page { background: var(--white); }
.landing-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 0 40px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.landing-nav .nav-links { display: flex; gap: 32px; }
.landing-nav .nav-links a { font-size: 14px; font-weight: 500; color: var(--text); }
.landing-nav .nav-links a:hover { color: var(--primary); }

.landing-hero {
    padding: 140px 40px 80px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: var(--white);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: 80vh;
}
.landing-hero h1 { font-size: 48px; line-height: 1.2; margin-bottom: 20px; }
.landing-hero h1 span { color: var(--primary-light); }
.landing-hero p { font-size: 16px; color: rgba(255,255,255,0.8); margin-bottom: 32px; line-height: 1.7; }
.landing-hero-btns { display: flex; gap: 16px; }

.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hero-stat { text-align: center; padding: 24px; background: rgba(255,255,255,0.08); border-radius: var(--radius-lg); backdrop-filter: blur(10px); }
.hero-stat-value { font-size: 32px; font-weight: 700; color: var(--primary-light); }
.hero-stat-label { font-size: 13px; color: rgba(255,255,255,0.7); margin-top: 4px; }

.landing-section { padding: 80px 40px; }
.landing-section.alt { background: var(--light); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: 32px; margin-bottom: 8px; }
.section-header p { color: var(--text-light); font-size: 15px; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.feature-card {
    padding: 32px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-icon { width: 60px; height: 60px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 0 auto 16px; }
.feature-card h3 { font-size: 16px; margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: var(--text-light); line-height: 1.6; }

.how-it-works { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; counter-reset: step; }
.step-card { position: relative; text-align: center; }
.step-number {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin: 0 auto 16px;
}
.step-card h4 { font-size: 15px; margin-bottom: 6px; }
.step-card p { font-size: 13px; color: var(--text-light); }

.landing-footer {
    background: var(--secondary);
    color: var(--white);
    padding: 60px 40px 24px;
}
.landing-footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 40px; margin-bottom: 40px; }
.landing-footer h4 { font-size: 14px; margin-bottom: 16px; }
.landing-footer a { display: block; color: rgba(255,255,255,0.7); font-size: 13px; margin-bottom: 8px; }
.landing-footer a:hover { color: var(--primary-light); }
.landing-footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 13px; color: rgba(255,255,255,0.5); }

/* ==============================================
   RESPONSIVE
   ============================================== */

@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
    .overlay {
        position: fixed; inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }
    .overlay.show { display: block; }
    .landing-hero { grid-template-columns: 1fr; padding: 120px 24px 60px; }
    .landing-hero h1 { font-size: 32px; }
    .landing-section { padding: 60px 24px; }
    .landing-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .page-header { flex-direction: column; align-items: flex-start; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .landing-footer-grid { grid-template-columns: 1fr; }
    .auth-card { padding: 24px; }
    .landing-nav { padding: 0 16px; }
    .landing-nav .nav-links { display: none; }
    .hero-stats { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .products-grid { grid-template-columns: 1fr; }
    .topbar { padding: 0 12px; }
    .page-content { padding: 16px; }
    .role-selector { grid-template-columns: 1fr; }
}

/* ==============================================
   PRINT
   ============================================== */

@media print {
    .sidebar, .topbar, .menu-toggle, .btn { display: none !important; }
    .main-content { margin-left: 0 !important; }
}

/* ==============================================
   ANIMATIONS
   ============================================== */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.3s ease; }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}
.slide-in { animation: slideIn 0.3s ease; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.pulse { animation: pulse 2s infinite; }

/* ==============================================
   UTILITIES
   ============================================== */

.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 12px; }
.text-lg { font-size: 16px; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-light); }

.bg-light { background: var(--light); }
.bg-white { background: var(--white); }

.w-full { width: 100%; }
.hidden { display: none !important; }
