/* --- CSS Variables --- */
:root {
    --primary: #004F8B;
    --primary-bright: #005DA2;
    --light-gray: #DADADA;
    --purple: #D41468;
    --orange: #ED6B06;
    --green: #95C11F;
    --bg: #ffffff;
    --text: #1d1d1b;
    --text-muted: #6c757d;
    --border: #e0e0e0;
    --border-light: #f0f0f0;
    --sidebar-width: 260px;
    --header-height: 60px;
    --radius: 8px;
    --radius-sm: 4px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --transition: 0.2s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: #f5f6fa;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary-bright);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Auth Page --- */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-bright) 100%);
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.auth-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 40px 32px;
    box-shadow: var(--shadow-md);
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.auth-logo p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-icon input {
    padding-left: 40px !important;
}

/* --- App Layout --- */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: transform var(--transition);
}

.sidebar-header {
    padding: 24px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.3px;
}

.sidebar-subtitle {
    font-size: 0.75rem;
    opacity: 0.7;
    display: block;
    margin-top: 2px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: rgba(255,255,255,0.85);
    font-size: 0.92rem;
    font-weight: 400;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.nav-item.active {
    background: var(--primary-bright);
    color: #fff;
    border-left-color: var(--green);
    font-weight: 500;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-user-info > i {
    font-size: 1.6rem;
    opacity: 0.8;
}

.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 500;
}

.sidebar-user-role {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    height: var(--header-height);
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-name {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.user-name i {
    margin-right: 4px;
}

.btn-logout {
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: color var(--transition);
}

.btn-logout:hover {
    color: var(--purple);
}

.content-body {
    padding: 24px 28px;
}

/* --- Mobile Header --- */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--primary);
    color: #fff;
    z-index: 110;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.burger-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
}

.mobile-title {
    font-weight: 600;
    font-size: 1rem;
}

.mobile-user a {
    color: #fff;
    font-size: 1.1rem;
    padding: 8px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

/* --- Content Toolbar --- */
.content-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.3;
}

.btn-primary {
    background: var(--primary-bright);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary);
    color: #fff;
}

.btn-danger {
    background: var(--purple);
    color: #fff;
}
.btn-danger:hover {
    background: #b8115a;
    color: #fff;
}

.btn-success {
    background: var(--green);
    color: #fff;
}
.btn-success:hover {
    background: #84ab1a;
    color: #fff;
}

.btn-warning {
    background: var(--orange);
    color: #fff;
}
.btn-warning:hover {
    background: #d45e05;
    color: #fff;
}

.btn-outline {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-outline:hover {
    background: #f5f6fa;
    color: var(--text);
    border-color: var(--light-gray);
}

.btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.82rem;
}

/* --- Tables --- */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table th {
    background: #f8f9fb;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    padding: 12px 14px;
    text-align: left;
    border-bottom: 2px solid var(--border-light);
    white-space: nowrap;
}

.data-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: #f8f9fb;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.td-primary {
    font-weight: 500;
}

.td-center {
    text-align: center;
}

.td-nowrap {
    white-space: nowrap;
}

.td-price {
    font-weight: 600;
    white-space: nowrap;
}

.td-actions {
    white-space: nowrap;
    display: flex;
    gap: 6px;
    align-items: center;
}

.th-narrow {
    width: 50px;
}

.table-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 14px !important;
    font-style: italic;
}

.row-inactive {
    opacity: 0.5;
}

/* --- Stock grouped table --- */
.stock-group-header {
    user-select: none;
}
.stock-group-toggle {
    cursor: pointer;
    display: inline;
}
.stock-group-toggle:hover {
    color: var(--primary);
}
.stock-toggle-icon {
    display: inline-block;
    width: 14px;
    margin-right: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.15s;
}
.stock-group-row {
    background: var(--bg-light);
}
.stock-group-row td {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    font-size: 0.85rem;
}
.td-secondary {
    color: var(--text-muted);
}
.stock-row-id {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.inline-form {
    display: inline;
}

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 500;
}

.badge-admin { background: #eef; color: var(--primary); }
.badge-leader { background: #fef3e6; color: var(--orange); }
.badge-manager { background: #ecfce5; color: #417505; }

/* --- Status --- */
.status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-active, .status-available { color: var(--green); }
.status-inactive { color: var(--text-muted); }
.status-reserved { color: var(--orange); }

/* --- Alerts --- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
    position: relative;
    line-height: 1.5;
}

.alert i:first-child {
    margin-top: 2px;
    flex-shrink: 0;
}

.alert-success {
    background: #ecfce5;
    color: #2d5a1a;
    border: 1px solid #c5e8b5;
}

.alert-error {
    background: #fce5ec;
    color: #7a1230;
    border: 1px solid #f0b8c8;
}

.alert-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
}
.alert-close:hover {
    opacity: 1;
}

.alert-list {
    margin: 0;
    padding-left: 18px;
}

/* --- Forms --- */
.form-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.required {
    color: var(--purple);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="tel"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--bg);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary-bright);
    box-shadow: 0 0 0 3px rgba(0,93,162,0.1);
}

.input-error {
    border-color: var(--purple) !important;
}

.field-error {
    color: var(--purple);
    font-size: 0.82rem;
    margin-top: 4px;
}

.field-hint {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 4px;
}

input[type="file"] {
    padding: 8px 0;
    border: none;
    font-size: 0.9rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    margin-top: 8px;
}

.form-meta {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 6px;
}

.current-file {
    margin-bottom: 10px;
}

.preview-thumb {
    max-width: 200px;
    max-height: 120px;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    display: block;
}

/* --- Cards Grid --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--transition);
}

.category-card:hover {
    box-shadow: var(--shadow-md);
}

.category-card-body {
    padding: 20px;
    flex: 1;
}

.category-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.category-card-title a {
    color: var(--text);
}
.category-card-title a:hover {
    color: var(--primary-bright);
}

.category-card-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 12px;
}

.category-card-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
}
.category-card-meta i {
    margin-right: 4px;
}

.category-card-actions {
    padding: 12px 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 8px;
}

/* --- Products Grid --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow var(--transition);
}

.product-card:hover {
    box-shadow: var(--shadow-md);
}

.product-card-image {
    display: block;
    aspect-ratio: 3/2;
    overflow: hidden;
    background: #f5f6fa;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-gray);
    font-size: 3rem;
}

.product-card-body {
    padding: 16px;
}

.product-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.product-card-title a {
    color: var(--text);
}
.product-card-title a:hover {
    color: var(--primary-bright);
}

.product-badge {
    display: inline-block;
    background: #fce5ec;
    color: var(--purple);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
}

.product-card-actions {
    padding: 12px 16px;
    border-top: 1px solid var(--border-light);
}

/* --- Product Detail --- */
.product-detail {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}

.product-header {
    display: flex;
    gap: 28px;
    margin-bottom: 28px;
}

.product-photo {
    max-width: 400px;
    flex-shrink: 0;
}

.product-photo img {
    border-radius: var(--radius);
    width: 100%;
}

.product-info h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.product-category {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.product-video-link,
.product-commercial {
    margin-bottom: 12px;
}

.product-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.product-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--primary);
}

.modifications-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modification-item {
    padding: 8px 14px;
    background: #f8f9fb;
    border-radius: var(--radius-sm);
}

.modification-item strong {
    color: var(--text);
}

/* --- WYSIWYG Content --- */
.wysiwyg-content {
    line-height: 1.7;
}

.wysiwyg-content h1, .wysiwyg-content h2, .wysiwyg-content h3,
.wysiwyg-content h4, .wysiwyg-content h5, .wysiwyg-content h6 {
    margin-top: 1em;
    margin-bottom: 0.5em;
}

.wysiwyg-content p {
    margin-bottom: 0.8em;
}

.wysiwyg-content img {
    border-radius: var(--radius-sm);
    margin: 0.5em 0;
}

.wysiwyg-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}

.wysiwyg-content table th,
.wysiwyg-content table td {
    border: 1px solid var(--border);
    padding: 8px 12px;
}

.wysiwyg-content table th {
    background: #f8f9fb;
}

/* --- Table Editor --- */
.table-editor {
    background: #f8f9fb;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.table-editor-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.editable-table input {
    border: 1px solid var(--border-light);
    padding: 6px 8px;
    font-size: 0.85rem;
    width: 100%;
    min-width: 80px;
}

.editable-table .col-actions,
.editable-table .row-actions {
    width: 36px;
    text-align: center;
}

.editable-table .remove-btn {
    background: none;
    border: none;
    color: var(--purple);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px;
}

.editable-table .remove-btn:hover {
    color: #b8115a;
}

/* --- Modifications Editor --- */
.modification-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 12px;
    background: #f8f9fb;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}

.modification-row .mod-name {
    flex: 0 0 200px;
}

.modification-row .mod-values {
    flex: 1;
}

.modification-row .mod-values input {
    margin-bottom: 6px;
}

.mod-add-value {
    font-size: 0.82rem;
    color: var(--primary-bright);
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
}

.mod-remove {
    background: none;
    border: none;
    color: var(--purple);
    cursor: pointer;
    font-size: 1rem;
    padding: 6px;
    flex-shrink: 0;
}

/* --- Articles List --- */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 20px;
    transition: box-shadow var(--transition);
}

.article-card:hover {
    box-shadow: var(--shadow-md);
}

.article-card-body {
    flex: 1;
}

.article-card-title {
    font-size: 0.95rem;
    font-weight: 500;
}

.article-card-title a {
    color: var(--text);
}
.article-card-title a i {
    margin-right: 6px;
    color: var(--primary-bright);
}
.article-card-title a:hover {
    color: var(--primary-bright);
}

.article-card-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.article-card-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    margin-left: 12px;
}

/* --- Article Detail --- */
.article-detail {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}

.article-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.article-meta i {
    margin-right: 4px;
}

/* --- Support --- */
.support-content {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}

/* --- Dashboard --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.dashboard-quick-links h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 16px;
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--text);
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
}

.quick-link:hover {
    box-shadow: var(--shadow-md);
    color: var(--primary-bright);
    transform: translateY(-2px);
}

.quick-link i {
    font-size: 1.8rem;
    color: var(--primary-bright);
}

/* --- Section Description --- */
.section-description {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    color: var(--text-muted);
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state p {
    font-size: 1rem;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text);
    background: var(--bg);
    transition: all var(--transition);
}

.pagination-link:hover {
    background: #f5f6fa;
    border-color: var(--primary-bright);
    color: var(--primary-bright);
}

.pagination-link.active {
    background: var(--primary-bright);
    border-color: var(--primary-bright);
    color: #fff;
}

.pagination-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    color: var(--text-muted);
}

/* --- File Link --- */
.file-link {
    display: inline-block;
    transition: transform var(--transition);
}

.file-link:hover {
    transform: scale(1.2);
}

.text-muted {
    color: var(--text-muted);
}

/* --- Characteristics table (view) --- */
.characteristics-table th {
    background: var(--primary);
    color: #fff;
    text-transform: none;
    font-size: 0.88rem;
}

/* --- Error pages --- */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    font-family: 'Inter', sans-serif;
    background: #f5f6fa;
}

.error-page h1 {
    font-size: 5rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.error-page p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* =============================================
   Responsive
   ============================================= */

/* Tablet */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }
    :root {
        --sidebar-width: 220px;
    }
    .content-body {
        padding: 20px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .product-header {
        flex-direction: column;
    }
    .product-photo {
        max-width: 100%;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .mobile-header {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
        z-index: 200;
    }
    :root {
        --sidebar-width: 280px;
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding-top: 56px;
    }

    .content-header {
        display: none;
    }

    .content-body {
        padding: 16px;
    }

    .content-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    .quick-links-grid {
        grid-template-columns: 1fr 1fr;
    }

    .article-card {
        flex-direction: column;
        align-items: stretch;
    }

    .article-card-actions {
        margin-left: 0;
        margin-top: 10px;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .td-actions {
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .quick-links-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 16px;
    }

    .auth-card {
        padding: 28px 20px;
    }
}
