﻿/* ============================================
   SEE&AGENDE - CSS GLOBAL
   Versão v8.0 - REFATORADO
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================
   1. ROOT VARIABLES - TEMAS
   ============================================ */
:root {
    /* Cores Principais */
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Neutras - Claro */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Espaçamentos */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Bordas */
    --radius-sm: 0.75rem;
    --radius-md: 1rem;
    --radius-lg: 1.25rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Transições */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Tema Claro */
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-hover: rgba(0, 0, 0, 0.04);
    --bg-modal: rgba(0, 0, 0, 0.6);
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --toast-bg: #ffffff;
    --toast-text: #1f2937;
    --scrollbar-track: #f3f4f6;
    --gradient: linear-gradient(135deg, #667eea, #764ba2);
    --gradient-light: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.05));
}

/* ============================================
   2. TEMA ESCURO
   ============================================ */
[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #121212;
    --bg-card: #1a1a1a;
    --bg-input: #262626;
    --bg-hover: rgba(255, 255, 255, 0.04);
    --bg-modal: rgba(0, 0, 0, 0.85);
    --text-primary: #f5f5f5;
    --text-secondary: #a8a8a8;
    --text-muted: #737373;
    --border-color: #262626;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --toast-bg: #1a1a1a;
    --toast-text: #f5f5f5;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --scrollbar-track: #1a1a1a;
    --gradient: linear-gradient(135deg, #667eea, #764ba2);
}

/* ============================================
   3. RESET
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background var(--transition), color var(--transition);
    line-height: 1.6;
}

/* ============================================
   4. SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 0.5rem;
    height: 0.5rem;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient);
    border-radius: var(--radius-full);
    border: 0.125rem solid var(--bg-secondary);
}

/* ============================================
   5. TIPOGRAFIA
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
}
h2 {
    font-size: 2rem;
}
h3 {
    font-size: 1.75rem;
}
h4 {
    font-size: 1.5rem;
}
h5 {
    font-size: 1.25rem;
}
h6 {
    font-size: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================
   6. BOTÕES
   ============================================ */
.btn-login {
    width: 100%;
    padding: 0.875rem;
    background: var(--gradient);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.5rem 1.875rem rgba(102, 126, 234, 0.35);
}

.btn-3d {
    background: var(--gradient);
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
    transform: translateY(0);
    box-shadow: 0 0.25rem 0.9375rem rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-3d:hover {
    transform: translateY(-0.1875rem);
    box-shadow: 0 0.5rem 1.875rem rgba(102, 126, 234, 0.4);
}

.btn-3d:active {
    transform: translateY(0.125rem);
    box-shadow: 0 0.125rem 0.625rem rgba(102, 126, 234, 0.2);
}

.btn-primary {
    background: var(--gradient);
    color: #ffffff;
    border: none;
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.5rem 1.5625rem rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-0.125rem);
}

.btn-logout {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: var(--danger);
    color: #ffffff;
    transform: translateY(-0.125rem);
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
    border-radius: var(--radius-full);
}

/* ============================================
   7. INPUTS
   ============================================ */
.input-group {
    position: relative;
    margin-bottom: var(--space-md);
}

.input-group .input-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    z-index: 2;
    pointer-events: none;
}

.input-group input {
    width: 100%;
    padding: 0.875rem 2.75rem 0.875rem 2.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    transition: var(--transition);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.1);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.input-group .toggle-pwd {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.125rem;
    padding: 0.25rem;
    z-index: 2;
    transition: var(--transition);
}

.input-group .toggle-pwd:hover {
    color: var(--primary);
}

/* ============================================
   8. MODAL
   ============================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg-modal);
    backdrop-filter: blur(0.75rem);
    -webkit-backdrop-filter: blur(0.75rem);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 1.25rem;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-xl);
    width: 31.25rem;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xl);
    position: relative;
    border: 1px solid var(--border-color);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(1.875rem) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content .close {
    position: absolute;
    right: 1.25rem;
    top: 1rem;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    background: none;
    border: none;
    line-height: 1;
}

.modal-content .close:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-content .form-group {
    margin-bottom: var(--space-md);
}

.modal-content .form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.modal-content .form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: var(--transition);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.modal-content .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.1);
}

.modal-buttons {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.modal-buttons button {
    padding: 0.625rem 1.5rem;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

/* ============================================
   9. APP PRINCIPAL
   ============================================ */
.app {
    display: none;
    background: var(--bg-primary);
    min-height: 100vh;
}

.header {
    background: var(--bg-secondary);
    padding: 0.9375rem 1.875rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header h2 i {
    -webkit-text-fill-color: initial;
    color: var(--primary);
}

.header>div {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ============================================
   10. SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 4.375rem;
    width: 16.25rem;
    height: calc(100% - 4.375rem);
    background: var(--bg-secondary);
    box-shadow: 0.125rem 0 1.25rem rgba(0, 0, 0, 0.05);
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 99;
    padding: 0.625rem 0;
    border-right: 1px solid var(--border-color);
}

.sidebar button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: calc(100% - 1.25rem);
    margin: 0.25rem 0.625rem;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.sidebar button i {
    width: 1.5rem;
    font-size: 1rem;
}

.sidebar button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar button.active {
    background: var(--gradient);
    color: #ffffff;
    box-shadow: 0 0.25rem 0.9375rem rgba(102, 126, 234, 0.3);
}

.sidebar button.active i {
    color: #ffffff;
}

.main {
    margin-left: 16.25rem;
    padding: 1.875rem;
    min-height: calc(100vh - 4.375rem);
}

/* ============================================
   11. MENU MOBILE
   ============================================ */
.menu-mobile-btn {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: var(--gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 0.25rem 1.25rem rgba(102, 126, 234, 0.4);
    z-index: 1000;
    cursor: pointer;
    font-size: 1.25rem;
    transition: var(--transition);
    align-items: center;
    justify-content: center;
}

.menu-mobile-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0.5rem 1.875rem rgba(102, 126, 234, 0.5);
}

.menu-mobile-btn:active {
    transform: scale(0.95);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(0.25rem);
    z-index: 98;
}

.sidebar-overlay.active {
    display: block;
}

/* ============================================
   12. BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full, 9999px);
    font-size: 0.6875rem;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fed7aa;
    color: #7c2d12;
}

.badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Badges do Header */
.badge-dono {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: #ffffff;
    border-radius: 9999px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(237, 137, 54, 0.3);
    letter-spacing: 0.3px;
}

.badge-super {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: #ffffff;
    border-radius: 9999px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.3);
    letter-spacing: 0.3px;
}

.badge-profissional {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: #ffffff;
    border-radius: 9999px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
    letter-spacing: 0.3px;
}

/* ============================================
   13. STATUS BADGES
   ============================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-badge .dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    display: inline-block;
}

.status-badge.agendado {
    background: #dbeafe;
    color: #1d4ed8;
}
.status-badge.agendado .dot {
    background: #1d4ed8;
}

.status-badge.pendente {
    background: #fef3c7;
    color: #d97706;
}
.status-badge.pendente .dot {
    background: #d97706;
}

.status-badge.concluido {
    background: #d1fae5;
    color: #065f46;
}
.status-badge.concluido .dot {
    background: #065f46;
}

.status-badge.cancelado {
    background: #fee2e2;
    color: #991b1b;
}
.status-badge.cancelado .dot {
    background: #991b1b;
}

.status-badge.ativo {
    background: #d1fae5;
    color: #065f46;
}
.status-badge.ativo .dot {
    background: #065f46;
}

.status-badge.inativo {
    background: #fee2e2;
    color: #991b1b;
}
.status-badge.inativo .dot {
    background: #991b1b;
}

/* ============================================
   14. TOAST E LOADING
   ============================================ */
.toast-notification {
    position: fixed;
    top: 5rem;
    right: 1.25rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-lg);
    color: var(--toast-text);
    font-weight: 500;
    z-index: 10000;
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    max-width: 26.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--toast-bg);
    border: 1px solid var(--border-color);
}

@keyframes slideInRight {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-notification i {
    font-size: 1.25rem;
}

.toast-success {
    border-left: 4px solid var(--success);
}
.toast-success i {
    color: var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}
.toast-error i {
    color: var(--danger);
}

.toast-warning {
    border-left: 4px solid var(--warning);
}
.toast-warning i {
    color: var(--warning);
}

.toast-info {
    border-left: 4px solid var(--info);
}
.toast-info i {
    color: var(--info);
}

.loading-spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3.125rem;
    height: 3.125rem;
    border: 4px solid rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
    z-index: 9999;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ============================================
   15. CARDS
   ============================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-0.25rem);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    font-size: 2.25rem;
    width: 3.25rem;
    height: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-light);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   16. TABELAS
   ============================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.data-table thead {
    background: var(--gradient);
}

.data-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.875rem;
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

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

/* ============================================
   17. UTILIDADES
   ============================================ */
.fade-in {
    animation: fadeIn 0.3s ease;
}

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

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin: 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.dashboard-actions {
    display: flex;
    gap: 0.5rem;
}

/* ============================================
   18. RESPONSIVIDADE
   ============================================ */
@media (max-width: 48rem) {
    .sidebar {
        transform: translateX(-100%);
        top: 0;
        height: 100%;
        width: 17.5rem;
        padding-top: 5rem;
        box-shadow: var(--shadow-xl);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main {
        margin-left: 0;
        padding: 1rem;
    }

    .menu-mobile-btn {
        display: flex;
    }

    .header {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }

    .header h2 {
        font-size: 1.125rem;
    }

    .modal-content {
        padding: 1.5rem;
        margin: 0.625rem;
    }

    .modal-buttons {
        flex-direction: column;
    }

    .modal-buttons button {
        width: 100%;
        text-align: center;
    }

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

    .data-table thead {
        display: none;
    }

    .data-table tbody tr {
        display: block;
        margin-bottom: 0.75rem;
    }

    .data-table tbody td {
        display: block;
        padding: 0;
        border-bottom: none;
    }
}

@media (max-width: 30rem) {
    .page-title {
        font-size: 1.25rem;
    }

    .stat-card .stat-value {
        font-size: 1.25rem;
    }

    .stat-card {
        padding: 0.75rem 0.875rem;
        gap: 0.625rem;
    }

    .stat-card .stat-icon {
        font-size: 1.5rem;
        width: 2.5rem;
        height: 2.5rem;
    }

    .modal-content {
        padding: 1.25rem;
    }

    .modal-content h3 {
        font-size: 1.25rem;
    }
}

/* Touch devices */
@media (hover: none) {
    .stat-card:hover {
        transform: none;
    }
    .card:hover {
        transform: none;
    }
    .btn-3d:hover {
        transform: none;
    }
    .btn-primary:hover {
        transform: none;
    }
    .sidebar button:hover {
        transform: none;
    }
}