/**
 * NudgeNinja - Centralized Stylesheet
 * ====================================================
 * Organized by: Base → Layout → Components → Utilities → Responsive
 */

/* ============================================
   1. BASE STYLES (Reset & Typography)
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scrollbar-gutter: stable;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    padding: 20px;
    line-height: 1.5;
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    color: #333;
    font-weight: 600;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ============================================
   2. LAYOUT COMPONENTS
   ============================================ */

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
}

.container-narrow {
    max-width: 600px;
    margin: 0 auto;
}

/* Card */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 10px;
}

.card-lg {
    padding: 30px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.card-header h2 {
    color: #333;
    font-size: 20px;
}

.card h2 {
    color: #333;
    font-size: 18px;
    margin-bottom: 5px;
}

/* Page Header */
.header {
    background: linear-gradient(135deg, #e8f5f4 0%, #d4eeec 100%);
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
    user-select: none;
}

/* Header Brand (Logo + Name) */
.header-brand {
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.brand-link:hover {
    text-decoration: none;
}

.header-logo {
    width: 80px;
    height: 80px;
    border-radius: 6px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a7f7a;
    line-height: 1.2;
}

.header-company-name {
    font-size: 1.25rem;
    color: #4a9994;
    font-weight: 500;
}

/* ============================================
   3. NAVIGATION
   ============================================ */
.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1001;
}

.nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
    user-select: none;
}

.nav-links a {
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    background: rgba(26, 127, 122, 0.15);
    color: #1a7f7a;
    text-decoration: none;
    box-shadow: inset 0 -2px 0 #1a7f7a;
}

.nav-links a.active {
    background: #1a7f7a;
    color: white;
}

.nav-links a.active:hover {
    background: #15635f;
    color: white;
}

/* User Avatar & Dropdown */
.user-avatar {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a7f7a 0%, #2a9d8f 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s;
    text-transform: uppercase;
    user-select: none;
}

.user-avatar:hover {
    transform: scale(1.05);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    background: white;
    border-radius: 8px;
    z-index:1100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 300px;
    overflow: hidden;
}

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

.user-dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.user-dropdown-email {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    word-break: break-all;
}

.user-dropdown-role {
    font-size: 11px;
    color: #1a7f7a;
    font-weight: 600;
    margin-top: 2px;
}

.user-dropdown a {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.user-dropdown a:hover {
    background: #f3f4f6;
}

.user-dropdown a:last-child {
    color: #dc2626;
    border-top: 1px solid #e5e7eb;
}

.user-dropdown a:last-child:hover {
    background: #fef2f2;
}

.user-dropdown a.upgrade-link {
    color: #1a7f7a;
    font-weight: 500;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #1a7f7a;
    margin: 3px 0;
    border-radius: 2px;
    transition: 0.3s;
}

.mobile-menu {
    display: none;
}

.mobile-menu a {
    display: block;
    padding: 12px 15px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu a:hover {
    background: #f8f9fa;
}

.mobile-menu a.active {
    color: #1a7f7a;
    background: rgba(26, 127, 122, 0.08);
    border-left: 3px solid #1a7f7a;
}

.mobile-upgrade-link {
    color: #1a7f7a !important;
    font-weight: 600 !important;
}

.mobile-user-info {
    padding: 12px 15px;
    color: #1a7f7a;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
}

/* ============================================
   4. BUTTONS
   ============================================ */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background 0.2s;
}

.btn-lg {
    padding: 12px 24px;
}

.btn-small {
    padding: 4px 8px;
    font-size: 15px;
}

.btn-primary {
    background: #1a7f7a;
    color: white;
}

.btn-primary:hover {
    background: #15635f;
    text-decoration: none;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
    text-decoration: none;
}

.btn-light {
    background: #e5e7eb;
    color: #374151;
}

.btn-light:hover {
    background: #d1d5db;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-success {
    background: #059669;
    color: white;
}

.btn-success:hover {
    background: #047857;
}

/* Button Group */
.actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

/* ============================================
   5. FORMS
   ============================================ */
.form-group {
    margin-bottom: 5px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.required {
    color: #dc2626;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #1a7f7a;
    box-shadow: 0 0 0 3px rgba(26, 127, 122, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* Filter Styles */
.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filters select, .filters input {
    width: auto;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.filters input[type="text"] {
    min-width: 240px;
}

/* ============================================
   6. ALERTS & MESSAGES
   ============================================ */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* ============================================
   7. TABLES
   ============================================ */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    overflow: hidden;
    text-overflow: ellipsis;
}

th {
    background: #7A7A7A;
    font-weight: 600;
    color: white;
}

tbody tr:hover {
    background-color: #d4eeec;
}

/* Clickable Table Rows */
.client-row {
    cursor: pointer;
    transition: background-color 0.15s;
    position: relative;
}

.client-row:hover {
    background-color: #d4eeec;
}

.client-row.row-menu-active {
    background-color: #c5e8e5;
}

.row-tooltip {
    display: none;
    position: absolute;
    left: 50%;
    top: -30px;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 100;
}

.client-row:hover .row-tooltip {
    display: block;
}

/* ============================================
   7a. TABLE COLUMN WIDTHS
   ============================================ */

/* --- Interactions Table - Admin view (6 columns) --- */
.table-interactions-admin th:nth-child(1),
.table-interactions-admin td:nth-child(1) { width: 120px; }  /* Date & Time */
.table-interactions-admin th:nth-child(2),
.table-interactions-admin td:nth-child(2) { width: 20%; }    /* Client */
.table-interactions-admin th:nth-child(3),
.table-interactions-admin td:nth-child(3) { width: 12%; }    /* Salesperson */
.table-interactions-admin th:nth-child(4),
.table-interactions-admin td:nth-child(4) { width: 90px; }   /* Type */
.table-interactions-admin th:nth-child(5),
.table-interactions-admin td:nth-child(5) { width: auto; }   /* Notes */
.table-interactions-admin th:nth-child(6),
.table-interactions-admin td:nth-child(6) { width: 120px; }   /* Actions */

/* --- Interactions Table - User view (5 columns) --- */
.table-interactions-user th:nth-child(1),
.table-interactions-user td:nth-child(1) { width: 120px; }   /* Date & Time */
.table-interactions-user th:nth-child(2),
.table-interactions-user td:nth-child(2) { width: 22%; }     /* Client */
.table-interactions-user th:nth-child(3),
.table-interactions-user td:nth-child(3) { width: 90px; }    /* Type */
.table-interactions-user th:nth-child(4),
.table-interactions-user td:nth-child(4) { width: auto; }    /* Notes */
.table-interactions-user th:nth-child(5),
.table-interactions-user td:nth-child(5) { width: 120px; }    /* Actions */

/* --- Clients Table - Admin view (6 columns) --- */
.table-clients-admin th:nth-child(1),
.table-clients-admin td:nth-child(1) { width: 30%; }         /* Company */
.table-clients-admin th:nth-child(2),
.table-clients-admin td:nth-child(2) { width: 15%; }         /* Contact Name */
.table-clients-admin th:nth-child(3),
.table-clients-admin td:nth-child(3) { width: 14%; }         /* Salesperson */
.table-clients-admin th:nth-child(4),
.table-clients-admin td:nth-child(4) { width: 80px; }       /* Last Contact */
.table-clients-admin th:nth-child(5),
.table-clients-admin td:nth-child(5) { width: 80px; }       /* Status */
.table-clients-admin th:nth-child(6),
.table-clients-admin td:nth-child(6) { width: 50px; }        /* Actions */

/* --- Clients Table - User view (5 columns) --- */
.table-clients-user th:nth-child(1),
.table-clients-user td:nth-child(1) { width: 35%; }          /* Company */
.table-clients-user th:nth-child(2),
.table-clients-user td:nth-child(2) { width: 20%; }          /* Contact Name */
.table-clients-user th:nth-child(3),
.table-clients-user td:nth-child(3) { width: 100px; }        /* Last Contact */
.table-clients-user th:nth-child(4),
.table-clients-user td:nth-child(4) { width: 110px; }        /* Status */
.table-clients-user th:nth-child(5),
.table-clients-user td:nth-child(5) { width: 80px; }         /* Actions */

/* Sortable Headers */
th.sortable {
    cursor: pointer;
    user-select: none;
}

th.sortable:hover {
    background: #6a6a6a;
}

th.sortable::after {
    content: ' \21C5';
    opacity: 0.3;
}

th.sortable.asc::after {
    content: ' \2191';
    opacity: 1;
}

th.sortable.desc::after {
    content: ' \2193';
    opacity: 1;
}

/* ============================================
   7b. BADGES (Days, Interaction Type, Date)
   ============================================ */

/* Days Badge */
.days-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

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

.days-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

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

.days-badge.never {
    background: #e5e7eb;
    color: #374151;
}

/* Interaction Type Badge */
.interaction-type-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.type-email { background: #dbeafe; color: #1e40af; }
.type-phone { background: #d1fae5; color: #065f46; }
.type-meeting { background: #fef3c7; color: #92400e; }
.type-video { background: #e0e7ff; color: #3730a3; }
.type-other { background: #e5e7eb; color: #374151; }

/* Date Badge */
.date-badge {
    display: inline-block;
    background: #d4eeec;
    color: #1a7f7a;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 10px;
}

/* ============================================
   8. STATUS BADGES
   ============================================ */
.status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-overdue {
    background: #fee2e2;
    color: #991b1b;
}

.status-due {
    background: #fef3c7;
    color: #92400e;
}

.status-ok {
    background: #d1fae5;
    color: #065f46;
}

.status-inactive {
    background: #e5e7eb;
    color: #6b7280;
}

/* ============================================
   9. STAT CARDS (Dashboard)
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(to bottom, #ffffff 0%, #f3f4f6 100%);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,1);
    border-left: 4px solid #1a7f7a;
    border-bottom: 3px solid #d1d5db;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,1);
    background: linear-gradient(to bottom, #ffffff 0%, #e8f5f4 100%);
    border-bottom-color: #9ca3af;
}

.stat-card:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1), inset 0 2px 4px rgba(0,0,0,0.06);
    background: linear-gradient(to bottom, #f3f4f6 0%, #ffffff 100%);
    border-bottom-width: 1px;
}

.stat-card.active {
    box-shadow: 0 0 0 3px rgba(26, 127, 122, 0.4), 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    background: linear-gradient(to bottom, #e8f5f4 0%, #d4eeec 100%);
    border-bottom-color: #1a7f7a;
}

.stat-card h3 {
    color: #666;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-card .number {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.stat-card.overdue {
    border-left-color: #ef4444;
}

.stat-card.warning {
    border-left-color: #f59e0b;
}

.stat-card.success {
    border-left-color: #10b981;
}

.stat-card.due {
    border-left-color: #ea580c;
}

/* ============================================
   10. DROPDOWN MENUS
   ============================================ */
.actions-menu {
    position: relative;
}

.menu-btn {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-btn:hover {
    background: #f3f4f6;
}

.menu-btn img {
    width: 16px;
    height: 16px;
}

.menu-dropdown {
    display: none;
    position: fixed;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 160px;
    z-index: 1000;
}

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

.menu-dropdown a, .menu-dropdown button {
    display: block;
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
}

.menu-dropdown a:hover, .menu-dropdown button:hover {
    background: #f3f4f6;
}

.menu-dropdown .menu-delete {
    color: #dc2626;
}

.menu-dropdown .menu-restore {
    color: #059669;
}

/* ============================================
   11. MODALS
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

/* ============================================
   12. TRIAL BANNERS
   ============================================ */
.trial-banner {
    padding: 10px 20px;
    font-size: 14px;
    position: relative;
    z-index: 1000;
    margin: -20px -20px 20px -20px;
    border-radius: 8px 8px 0 0;
}

.trial-banner-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.trial-banner-icon {
    font-size: 18px;
}

.trial-banner-text {
    flex: 0 1 auto;
}

.trial-banner-btn {
    background: rgba(255,255,255,0.9);
    color: inherit;
    padding: 6px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.2s;
}

.trial-banner-btn:hover {
    background: white;
}

.trial-banner-dismiss {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    padding: 0 5px;
    line-height: 1;
}

.trial-banner-dismiss:hover {
    opacity: 1;
}

.trial-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.trial-warning .trial-banner-btn {
    color: #92400e;
}

.trial-reminder {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.trial-reminder .trial-banner-btn {
    color: #1e40af;
}

.trial-expired {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.trial-expired .trial-banner-btn {
    color: #991b1b;
}

/* ============================================
   13. UTILITY CLASSES
   ============================================ */

/* Text */
.text-muted { color: #6b7280; }
.text-success { color: #065f46; }
.text-danger { color: #dc2626; }
.text-warning { color: #92400e; }
.text-primary { color: #2563eb; }
.text-center { text-align: center; }

/* Subtitle */
.subtitle {
    color: #666;
    margin-bottom: 30px;
}

/* Back Link */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #2563eb;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.empty-state h3 {
    color: #6b7280;
    margin-bottom: 10px;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

/* Notes Preview (truncated) */
.notes-preview {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Client Filter Info */
.client-filter-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.client-filter-info a {
    color: #2563eb;
    text-decoration: none;
}

/* Date List (significant dates) */
.date-list {
    list-style: none;
}

.date-item {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Dates Link */
.dates-link {
    display: inline-block;
    margin-top: 15px;
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
}

.dates-link:hover {
    text-decoration: underline;
}

/* Prevent text selection on UI elements */
.btn,
.nav-links a,
.hamburger,
.user-avatar,
.stat-card,
.menu-btn,
.menu-dropdown a,
.menu-dropdown button,
.trial-banner,
.card-header h2,
.modal-header,
.mobile-menu a,
.toggle-switch,
.days-badge,
th,
label {
    user-select: none;
}

/* ============================================
   14. READ-ONLY MODE
   ============================================ */
body.read-only-mode .btn-add,
body.read-only-mode .btn-primary[type="submit"],
body.read-only-mode form[method="POST"] button[type="submit"]:not(.btn-allow-readonly),
body.read-only-mode .menu-delete {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* ============================================
   15. RESPONSIVE STYLES
   ============================================ */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .header {
        flex-wrap: wrap;
        padding: 12px 15px;
    }
    
    .header-brand {
        order: 1;
    }
    
    .header-logo {
        width: 34px;
        height: 34px;
    }
    
    .brand-name {
        font-size: 1rem;
    }
    
    .user-info {
        order: 2;
        margin-left: auto;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu {
        width: 100%;
        margin-top: 15px;
        order: 3;
    }
    
    .mobile-menu.active {
        display: block;
    }
    
    .trial-banner {
        margin: -10px -10px 15px -10px;
        padding: 12px 15px;
    }
    
    .trial-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .trial-banner-dismiss {
        position: absolute;
        top: 5px;
        right: 10px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 10px 12px;
    }
    
    .stat-card .number {
        font-size: 20px;
    }
    
    .filters input[type="text"] {
        min-width: 150px;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 8px;
    }
    
    .container-narrow {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}
