:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --secondary: #10b981;
    --accent: #f59e0b;
    --danger: #ef4444;
    --warning: #f97316;
    --success: #22c55e;
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

[data-theme="forest"] {
    --primary: #16a34a;
    --primary-light: #4ade80;
    --primary-dark: #15803d;
    --secondary: #0ea5e9;
    --accent: #f59e0b;
    --bg-gradient: linear-gradient(135deg, #16a34a 0%, #15803d 50%, #059669 100%);
    --text-primary: #064e3b;
    --text-secondary: #059669;
    --border: #d1fae5;
    --bg-primary: #f0fdf4;
}

[data-theme="sunset"] {
    --primary: #ea580c;
    --primary-light: #fb923c;
    --primary-dark: #c2410c;
    --secondary: #ec4899;
    --accent: #fbbf24;
    --bg-gradient: linear-gradient(135deg, #ea580c 0%, #dc2626 50%, #ec4899 100%);
    --text-primary: #451a03;
    --text-secondary: #ea580c;
    --border: #fed7aa;
    --bg-primary: #fff7ed;
}

[data-theme="ocean"] {
    --primary: #0284c7;
    --primary-light: #38bdf8;
    --primary-dark: #0369a1;
    --secondary: #06b6d4;
    --accent: #8b5cf6;
    --bg-gradient: linear-gradient(135deg, #0284c7 0%, #0369a1 50%, #06b6d4 100%);
    --text-primary: #0c4a6e;
    --text-secondary: #0284c7;
    --border: #bae6fd;
    --bg-primary: #f0f9ff;
}

[data-theme="rose"] {
    --primary: #ec4899;
    --primary-light: #f472b6;
    --primary-dark: #db2777;
    --secondary: #f59e0b;
    --accent: #8b5cf6;
    --bg-gradient: linear-gradient(135deg, #ec4899 0%, #db2777 50%, #8b5cf6 100%);
    --text-primary: #581c87;
    --text-secondary: #be185d;
    --border: #fbcfe8;
    --bg-primary: #fdf2f8;
}

[data-theme="dark"] {
    --primary: #00d4ff;
    --primary-light: #67e8f9;
    --primary-dark: #0891b2;
    --secondary: #22c55e;
    --accent: #f59e0b;
    --danger: #f87171;
    --success: #4ade80;
    --bg-gradient: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    --bg-primary: #0f0c29;
    --bg-secondary: rgba(255, 255, 255, 0.03);
    --text-primary: #e4e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px -1px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --secondary: #10b981;
    --accent: #f59e0b;
    --danger: #ef4444;
    --success: #22c55e;
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-gradient);
    padding: 20px;
}

.login-box {
    background: var(--bg-secondary);
    padding: 48px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
    text-align: center;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box .logo-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.login-box h2 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 700;
}

.login-box .subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

.error-message {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: var(--danger);
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid var(--danger);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 13px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-group select option {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 8px;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--primary-light);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--bg-gradient);
    color: white;
    box-shadow: 0 3px 10px 0 rgba(102, 126, 234, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px 0 rgba(102, 126, 234, 0.45);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1.5px solid var(--border);
}

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

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-xs {
    padding: 4px 10px;
    font-size: 11px;
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    margin-left: 8px;
}

.btn-success:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    margin-left: 8px;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.register-link {
    margin-top: 28px;
    font-size: 14px;
    color: var(--text-secondary);
}

.register-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.register-link a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.navbar {
    background: var(--bg-secondary);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
}

.logo {
    font-size: 19px;
    font-weight: 700;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    font-size: 13px;
}

.nav-links a:hover,
.nav-links a.active {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(118, 75, 162, 0.1));
    color: var(--primary);
}

.user-info {
    color: var(--text-muted);
    font-size: 14px;
    padding: 0 12px;
}

.logout {
    background: linear-gradient(135deg, #fef2f2, #fee2e2) !important;
    color: var(--danger) !important;
}

.logout:hover {
    background: linear-gradient(135deg, #fee2e2, #fecaca) !important;
}

.main-content {
    width: 100%;
    max-width: 1920px;
    margin: 24px auto;
    padding: 0 20px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1.5px solid var(--border);
}

.page-header h1 {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
}

.search-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.search-row .form-group {
    flex: 1;
    min-width: 150px;
    max-width: 200px;
}

.search-row .form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.search-row .form-group input {
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--bg-secondary);
    transition: all 0.3s ease;
}

.search-row .form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-actions {
    display: flex;
    gap: 12px;
    padding-top: 8px;
}

.dashboard h1 {
    color: var(--text-primary);
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.description {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 40px;
    line-height: 1.8;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    font-size: 48px;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: var(--radius);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    margin-top: 4px;
}

.quick-actions {
    background: var(--bg-secondary);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.quick-actions h2 {
    color: var(--text-primary);
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 700;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.action-btn {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 24px;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.action-btn:hover {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(118, 75, 162, 0.05));
    border-color: var(--primary-light);
    transform: translateY(-4px);
}

.btn-icon {
    font-size: 36px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

.product-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.product-header h3 {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
}

.product-type {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(118, 75, 162, 0.1));
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.product-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.7;
}

.product-details {
    margin-bottom: 24px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    padding: 16px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-muted);
    font-size: 14px;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 15px;
}

.table-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--border);
    height: calc(100vh - 320px);
    overflow-y: auto;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.data-table th {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8), rgba(241, 245, 249, 0.8));
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.data-table tbody tr {
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.02), rgba(118, 75, 162, 0.02));
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
}

.status.pending {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
}

.status.approved {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #059669;
}

.status.rejected {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
}

.status.active {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #059669;
}

.role {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.role.admin {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
}

.role.client {
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
    color: #7c3aed;
}

.empty-state {
    text-align: center;
    padding: 80px 40px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 24px;
    opacity: 0.8;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 28px;
}

.form-container {
    background: var(--bg-secondary);
    padding: 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    max-width: 560px;
    margin: 0 auto;
    border: 1px solid var(--border);
    animation: slideUp 0.4s ease-out;
}

.form-container h1 {
    color: var(--text-primary);
    margin-bottom: 22px;
    font-size: 22px;
    font-weight: 700;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.policy-info {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8), rgba(241, 245, 249, 0.8));
    padding: 24px;
    border-radius: var(--radius);
    margin-bottom: 32px;
    border-left: 4px solid var(--primary);
}

.policy-info h3 {
    color: var(--text-primary);
    margin-bottom: 18px;
    font-size: 18px;
    font-weight: 700;
}

.info-row {
    padding: 10px 0;
    color: var(--text-secondary);
    font-size: 15px;
}

.info-row .label {
    color: var(--text-muted);
    font-weight: 500;
}

.certificate-view {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 48px;
    border: 1px solid var(--border);
    animation: slideUp 0.4s ease-out;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border);
}

.view-header h1 {
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 800;
}

.certificate-content {
    background: linear-gradient(135deg, rgba(250, 251, 252, 0.8), rgba(248, 250, 252, 0.8));
    padding: 48px;
    border-radius: var(--radius);
    margin-bottom: 36px;
    border: 2px solid var(--border);
}

.certificate-content pre {
    font-family: 'Microsoft YaHei', 'Songti SC', serif;
    font-size: 16px;
    line-height: 2.2;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.certificate-meta {
    margin-bottom: 36px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8), rgba(241, 245, 249, 0.8));
    border-radius: var(--radius);
}

.meta-row {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}

.meta-row:last-child {
    border-bottom: none;
}

.meta-row .label {
    color: var(--text-muted);
    width: 120px;
    display: inline-block;
    font-weight: 500;
}

.view-actions {
    display: flex;
    gap: 16px;
}

.theme-switcher {
    position: relative;
    display: inline-block;
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.theme-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    min-width: 160px;
    display: none;
    z-index: 1000;
}

.theme-dropdown.active {
    display: block;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 13px;
    color: var(--text-primary);
}

.theme-option:hover {
    background: var(--border);
}

.theme-preview {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
}

.theme-preview.default {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.theme-preview.forest {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.theme-preview.sunset {
    background: linear-gradient(135deg, #ea580c, #dc2626);
}

.theme-preview.ocean {
    background: linear-gradient(135deg, #0284c7, #0369a1);
}

.theme-preview.rose {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

.theme-preview.dark {
    background: linear-gradient(135deg, #0f0c29, #302b63);
}

.theme-preview.light {
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    border-color: #e2e8f0;
}

@media (max-width: 768px) {
    .nav-links {
        flex-wrap: wrap;
        gap: 6px;
    }

    .nav-links a {
        font-size: 13px;
        padding: 8px 12px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .table-container {
        overflow-x: auto;
    }

    .data-table th,
    .data-table td {
        padding: 14px 12px;
        font-size: 13px;
    }

    .page-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .form-container,
    .certificate-view {
        padding: 24px;
    }

    .certificate-content {
        padding: 24px;
    }

    .view-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
}

@media print {
    .navbar,
    .nav-container,
    .view-actions,
    .btn,
    .theme-switcher {
        display: none !important;
    }

    .certificate-view {
        box-shadow: none;
        padding: 0;
    }

    .certificate-content {
        border: 2px solid #333;
    }
}