/* Belegbuch - Austrian Tax SaaS Styles */

/* Light Theme (default) */
:root, [data-theme="light"] {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #16a34a;
    --warning: #ea580c;
    --danger: #dc2626;
    --info: #0891b2;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #1e293b;
    --card-bg: #ffffff;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);

    --sidebar-width: 250px;
    --header-height: 60px;

    --sidebar-bg: #1e293b;
    --sidebar-text: rgba(255,255,255,0.7);
    --sidebar-text-hover: #ffffff;
    --sidebar-border: rgba(255,255,255,0.1);

    --table-hover: var(--bg-secondary);
    --input-bg: var(--bg-primary);
}

/* Dark Theme */
[data-theme="dark"] {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #94a3b8;
    --success: #22c55e;
    --warning: #f97316;
    --danger: #ef4444;
    --info: #06b6d4;

    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-dark: #020617;
    --card-bg: #1e293b;

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-color: #334155;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.4);

    --sidebar-bg: #020617;
    --sidebar-text: rgba(255,255,255,0.7);
    --sidebar-text-hover: #ffffff;
    --sidebar-border: rgba(255,255,255,0.1);

    --table-hover: #334155;
    --input-bg: #1e293b;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

html, body {
    max-width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-secondary);
    overflow-x: hidden;
    width: 100%;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 24px;
    box-sizing: border-box;
    max-width: 100%;
    overflow-x: auto;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.logo-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
}

.nav-menu {
    list-style: none;
    padding: 16px 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

/* Custom scrollbar for webkit browsers */
.nav-menu::-webkit-scrollbar {
    width: 6px;
}

.nav-menu::-webkit-scrollbar-track {
    background: transparent;
}

.nav-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.nav-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-icon {
    width: 22px;
    text-align: center;
    font-size: 17px;
    flex-shrink: 0;
    display: inline-block;
}

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 8px 20px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

/* Mobile Header (hidden on desktop, shown on mobile) */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--sidebar-bg);
    z-index: 998;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.mobile-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
}

.mobile-logo {
    width: 180px;
    height: auto;
}

.mobile-nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-nav-toggle span {
    width: 25px;
    height: 3px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
    min-width: 0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.card-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
}

.card-body {
    padding: 20px;
    overflow-x: auto;
    background: var(--card-bg);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.stat-card.warning {
    border-left: 4px solid var(--warning);
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    align-items: stretch;
}

.dashboard-grid .card {
    height: 100%;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.dashboard-grid .card-body {
    flex: 1;
}

.dashboard-grid .expenses-card {
    grid-column: span 2;
}

/* Tables */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -20px;
    padding: 0 20px;
    background: var(--card-bg);
}

.table {
    width: 100%;
    table-layout: auto;
    background: var(--card-bg);
}

.action-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background: var(--table-hover);
}

.row-overdue {
    background: #fef2f2 !important;
}

[data-theme="dark"] .row-overdue {
    background: rgba(239, 68, 68, 0.15) !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-primary { background: #dbeafe; color: #2563eb; }
.badge-secondary { background: #f1f5f9; color: #64748b; }
.badge-success { background: #dcfce7; color: #16a34a; }
.badge-danger { background: #fee2e2; color: #dc2626; }
.badge-warning { background: #ffedd5; color: #ea580c; }
.badge-info { background: #cffafe; color: #0891b2; }

[data-theme="dark"] .badge-primary { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
[data-theme="dark"] .badge-secondary { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }
[data-theme="dark"] .badge-success { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
[data-theme="dark"] .badge-danger { background: rgba(239, 68, 68, 0.2); color: #f87171; }
[data-theme="dark"] .badge-warning { background: rgba(249, 115, 22, 0.2); color: #fb923c; }
[data-theme="dark"] .badge-info { background: rgba(6, 182, 212, 0.2); color: #22d3ee; }

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-btn {
    padding: 6px 14px;
    font-size: 13px;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-btn:hover {
    background: var(--bg-secondary);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-lg {
    max-width: 800px;
}

.modal-xl {
    max-width: 1100px;
}

/* Items table in invoice/quote modals */
.items-table {
    width: 100%;
    table-layout: fixed;
}

.items-table th,
.items-table td {
    padding: 8px 6px;
    font-size: 13px;
}

.items-table input,
.items-table select {
    width: 100%;
    font-size: 13px;
    padding: 6px 8px;
    box-sizing: border-box;
}

.items-table input[type="number"] {
    text-align: right;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-body h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 20px 0 12px;
    color: var(--text-secondary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

/* Items Table (quotes/invoices) */
.items-table input,
.items-table select {
    padding: 6px 8px;
    font-size: 13px;
}

.items-table .item-total {
    font-weight: 600;
    text-align: right;
}

/* Totals */
.quote-totals, .invoice-totals {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.total-final {
    font-size: 18px;
    font-weight: 700;
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
    padding-top: 12px;
}

/* Landing Page */
.landing-page {
    min-height: 100vh;
}

.landing-header {
    background: var(--sidebar-bg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: relative;
}

.nav-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Navigation buttons - smaller on desktop */
.btn-nav {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 10px;
}

.btn-nav.btn-lg {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-nav .btn-icon {
    display: none;
}

.btn-nav .btn-text {
    display: inline;
}

/* Mobile menu toggle (hamburger) - hidden on desktop */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.hero {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    padding: 120px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" fill="white" opacity="0.05"/></svg>');
    background-size: 50px 50px;
    pointer-events: none;
}

.hero h1 {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 22px;
    color: rgba(255,255,255,0.95);
    margin-bottom: 40px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero .btn-lg {
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.features {
    padding: 100px 0;
    background: var(--bg-primary);
}

.features h2, .pricing h2 {
    text-align: center;
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.features h2::after, .pricing h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, #059669, #047857);
    margin: 16px auto 48px;
    border-radius: 2px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-card {
    background: var(--card-bg);
    text-align: center;
    padding: 40px 32px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    animation: fadeInUp 0.6s ease-out backwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }
.feature-card:nth-child(7) { animation-delay: 0.7s; }
.feature-card:nth-child(8) { animation-delay: 0.8s; }
.feature-card:nth-child(9) { animation-delay: 0.9s; }

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    border-color: #059669;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: inline-block;
    padding: 24px;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
    color: white;
    transition: all 0.3s ease;
}

.feature-icon i {
    display: block;
    color: white;
}

.feature-card:hover .feature-icon {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.4);
}

.feature-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.pricing {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-primary);
    padding: 40px 32px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 2px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    animation: fadeInUp 0.6s ease-out backwards;
}

.pricing-card:nth-child(1) { animation-delay: 0.2s; }
.pricing-card:nth-child(2) { animation-delay: 0.4s; }
.pricing-card:nth-child(3) { animation-delay: 0.6s; }

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.pricing-card.featured {
    border: 2px solid #059669;
    transform: scale(1.05);
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.05) 0%, rgba(4, 120, 87, 0.05) 100%);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-4px);
}

.pricing-card h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.price {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 32px;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pricing-card ul {
    list-style: none;
    margin-bottom: 32px;
    text-align: left;
}

.pricing-card li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.pricing-card li:last-child {
    border-bottom: none;
}

.pricing-card li::before {
    content: '✓';
    color: #059669;
    font-weight: bold;
    margin-right: 12px;
    font-size: 18px;
}

/* Landing page button overrides */
.landing-page .btn-primary {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.landing-page .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.landing-page .btn-primary:hover::before {
    left: 100%;
}

.landing-page .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.5);
}

.landing-page .btn-primary:active {
    transform: translateY(0);
}

.landing-page .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.landing-page .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.landing-page .btn-lg {
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 14px;
}

/* Pricing card buttons */
.pricing-card .btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border: none;
    padding: 14px 24px;
    font-weight: 600;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
    transition: all 0.3s ease;
}

.pricing-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.4);
}

.pricing-card .btn-secondary {
    width: 100%;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: 14px 24px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.pricing-card .btn-secondary:hover {
    border-color: #059669;
    color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.landing-footer {
    background: var(--sidebar-bg);
    color: rgba(255,255,255,0.7);
    padding: 48px 0;
    text-align: center;
}

/* Legal Pages (Terms & Privacy) */
.legal-page {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    width: 100%;
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

.legal-container h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.legal-date {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

.legal-container h2 {
    font-size: 24px;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 16px;
    color: var(--text);
}

.legal-container h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--text);
}

.legal-container p {
    line-height: 1.7;
    margin-bottom: 16px;
    color: var(--text);
}

.legal-container ul,
.legal-container ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.legal-container li {
    margin-bottom: 8px;
    line-height: 1.7;
    color: var(--text);
}

.legal-container a {
    color: var(--primary);
    text-decoration: none;
}

.legal-container a:hover {
    text-decoration: underline;
}

.lang-content {
    display: none;
}

.lang-content.active {
    display: block;
}

/* Auth Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
}

.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.auth-card {
    background: var(--card-bg);
    padding: 48px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 460px;
    position: relative;
    border: 1px solid var(--border-color);
}

/* Language Selector */
.language-selector {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 6px 14px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    transition: all 0.3s ease;
    position: relative;
}

.lang-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.4);
}

.auth-card h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 16px;
}

.auth-form {
    margin-bottom: 24px;
}

.auth-form .btn-primary {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border: none;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.auth-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.4);
}

.forgot-link {
    color: #059669;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #047857;
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.auth-footer a {
    color: #059669;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: #047857;
    text-decoration: underline;
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* Theme Toggle */
.sidebar-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.sidebar-footer .user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    margin-bottom: 4px;
}

.sidebar-footer .user-name {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    font-size: 14px;
}

.sidebar-footer .user-role {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}

.sidebar-footer .btn {
    flex: 1;
}

.sidebar-footer > div:last-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.theme-toggle {
    background: rgba(255,255,255,0.1);
    border: none;
    color: rgba(255,255,255,0.7);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Theme icons - show moon in light mode (to switch to dark), sun in dark mode (to switch to light) */
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    display: none;
}

/* Default (light theme or no theme set) - show moon icon */
.theme-toggle .icon-moon {
    display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    color: white;
}

.user-dropdown-toggle:hover,
.user-dropdown-toggle.active {
    background: rgba(255,255,255,0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.user-info-compact {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    text-align: left;
}

.user-name-compact {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    font-size: 14px;
}

.user-role-compact {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}

.user-version-compact {
    color: rgba(255,255,255,0.4);
    font-size: 10px;
    font-family: 'Courier New', monospace;
    font-weight: 400;
}

.dropdown-arrow {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.user-dropdown-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    margin-bottom: 8px;
    background: var(--bg-primary, white);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
    z-index: 1000;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary, #1a202c);
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.dropdown-item:hover {
    background: var(--bg-secondary, #f7fafc);
}

.dropdown-item i {
    font-size: 16px;
    opacity: 0.7;
}

.dropdown-item.logout-item {
    color: #e53e3e;
}

.dropdown-item.logout-item:hover {
    background: #fff5f5;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color, #e2e8f0);
    margin: 4px 0;
}

/* Theme Toggle - Polished Design */
.theme-toggle-item {
    position: relative;
    overflow: hidden;
}

.theme-toggle-item:hover {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(59, 130, 246, 0.1));
}

.theme-icon-wrapper {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-item .icon-sun,
.theme-toggle-item .icon-moon {
    position: absolute;
    font-size: 18px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle-item .icon-sun {
    color: #f59e0b;
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.theme-toggle-item .icon-moon {
    color: #3b82f6;
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="dark"] .theme-toggle-item .icon-moon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

[data-theme="dark"] .theme-toggle-item .icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Theme text labels */
.theme-text-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.theme-label-light,
.theme-label-dark {
    transition: all 0.3s ease;
    position: absolute;
    white-space: nowrap;
}

.theme-label-light {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.theme-label-dark {
    opacity: 1;
    transform: translateY(0);
}

[data-theme="dark"] .theme-label-light {
    opacity: 1;
    transform: translateY(0);
}

[data-theme="dark"] .theme-label-dark {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

/* Pulsing animation on hover */
.theme-toggle-item:hover .icon-sun,
.theme-toggle-item:hover .icon-moon {
    animation: theme-pulse 0.6s ease-in-out;
}

@keyframes theme-pulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.15) rotate(10deg);
    }
}

/* ==============================================
   RESPONSIVE DESIGN
   Mobile First with Progressive Enhancement
   ============================================== */

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Device-specific utilities */
[data-touch="true"] .btn,
[data-touch="true"] .form-input,
[data-touch="true"] .nav-link {
    min-height: 44px;
    min-width: 44px;
}

/* Mobile devices: 0-767px */
@media (max-width: 767px) {
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    * {
        max-width: 100%;
    }

    /* Show mobile menu button */
    .mobile-menu-btn {
        display: flex;
        width: 44px;
        height: 44px;
    }

    /* Show mobile header */
    .mobile-header {
        display: block;
    }

    /* Hide sidebar by default - slide from RIGHT */
    .sidebar {
        left: auto;
        right: 0;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        top: 0; /* Full height including under header */
    }

    /* Sidebar navigation - more compact */
    .nav-link {
        padding: 10px 16px;
        font-size: 14px;
    }

    /* Show sidebar when active */
    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        display: block;
    }

    /* Main content full width with space for fixed header */
    .main-content {
        margin-left: 0;
        padding: 80px 16px 16px; /* Top padding for mobile header (header height + nice buffer) */
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    /* Page header - more compact */
    .page-header {
        margin-bottom: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        position: relative;
        z-index: 1;
    }

    .page-header h1 {
        font-size: 20px;
    }

    .header-actions {
        width: 100%;
    }

    /* Dashboard grid */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        align-items: start;
    }

    .dashboard-grid .card {
        height: auto;
    }

    .dashboard-grid .expenses-card {
        grid-column: span 1;
    }

    /* Hide mobile columns */
    .hide-mobile {
        display: none !important;
    }

    /* Mobile-responsive tables */
    .table-mobile-responsive {
        font-size: 14px;
    }

    .table-mobile-responsive th,
    .table-mobile-responsive td {
        padding: 8px 6px;
    }

    .table-mobile-responsive td:first-child {
        font-weight: 500;
    }

    /* Forms */
    .form-row {
        flex-direction: column;
        width: 100%;
    }

    .form-group {
        margin-bottom: 12px;
        width: 100%;
        max-width: 100%;
    }

    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px; /* Prevent zoom on iOS */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Buttons */
    /* Primary action buttons - full width for prominence */
    .btn-primary,
    .btn-success,
    .btn-danger {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }

    /* Secondary/utility buttons - auto width */
    .btn-secondary {
        width: auto;
        padding: 8px 12px;
        font-size: 13px;
    }

    /* Small buttons - compact inline style */
    .btn-sm {
        width: auto;
        padding: 6px 10px;
        font-size: 12px;
        margin: 2px;
    }

    /* Table action buttons - compact and inline */
    .table .btn,
    .table .btn-sm {
        width: auto;
        min-width: 60px;
        padding: 6px 10px;
        font-size: 12px;
        margin: 2px;
        display: inline-flex;
    }

    /* Button groups - wrap instead of stack */
    .btn-group {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        width: 100%;
    }

    /* Modal footer buttons - stack vertically */
    .modal-footer .btn-group,
    .modal-footer .btn-group {
        flex-direction: column;
        gap: 8px;
    }

    /* Modal footer individual buttons */
    .modal-footer .btn {
        width: 100%;
    }

    /* Filter buttons - compact on mobile */
    .filter-btn {
        padding: 5px 10px;
        font-size: 12px;
    }

    /* Tables - horizontal scroll */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100vw;
    }

    .table {
        width: 100%;
        font-size: 12px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .table thead,
    .table tbody,
    .table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }

    .table th,
    .table td {
        padding: 6px 4px;
        font-size: 11px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Make specific columns narrower on mobile */
    .table th:first-child,
    .table td:first-child {
        width: 80px;
    }

    /* Actions column - keep buttons inline */
    .table td:last-child {
        white-space: nowrap;
        min-width: 120px;
        overflow: visible;
    }

    /* Landing page responsive */
    .landing-nav {
        flex-direction: row;
        justify-content: space-between;
        padding: 12px 0;
    }

    /* Show hamburger menu on mobile */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Mobile dropdown menu */
    .nav-actions {
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--sidebar-bg);
        flex-direction: column;
        gap: 12px;
        padding: 20px;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
        min-width: 200px;
        margin-top: 8px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 1000;
    }

    .nav-actions.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-actions .language-selector {
        margin-right: 0;
        width: 100%;
        justify-content: center;
    }

    /* Full text buttons on mobile (no icons) */
    .btn-nav .btn-text {
        display: inline;
    }

    .btn-nav .btn-icon {
        display: none;
    }

    .btn-nav {
        width: 100%;
        padding: 12px 16px;
        justify-content: center;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero {
        padding: 60px 0;
    }

    .features, .pricing {
        padding: 40px 0;
    }

    /* Modals */
    .modal-content {
        margin: 0;
        padding: 16px;
        width: 100%;
        max-width: 100vw;
        min-height: 100vh;
        border-radius: 0;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .modal-header {
        padding: 12px 0;
        margin-bottom: 16px;
    }

    .modal-body {
        padding: 0;
    }

    .modal-footer {
        padding: 16px 0 0;
        margin-top: 16px;
    }

    .modal-header {
        position: sticky;
        top: 0;
        background: var(--card-bg);
        z-index: 10;
        width: 100%;
        box-sizing: border-box;
    }

    .modal-body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
        padding: 20px 16px;
    }

    .modal-footer {
        width: 100%;
        box-sizing: border-box;
    }

    /* Cards */
    .card {
        margin-bottom: 16px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }

    .card-body {
        padding: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .card-header {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .card-header h2,
    .card-header h3 {
        font-size: 16px;
    }

    /* Stats cards */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Landing page */
    .landing-nav {
        padding: 12px 0;
    }

    .nav-actions {
        gap: 8px;
    }

    .nav-actions .btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .hero {
        width: 100%;
        max-width: 100%;
        padding: 60px 16px 50px;
        box-sizing: border-box;
        overflow: hidden;
    }

    .hero h1 {
        font-size: 32px;
        word-wrap: break-word;
        margin-bottom: 16px;
    }

    .hero-subtitle {
        font-size: 16px;
        word-wrap: break-word;
        margin-bottom: 28px;
    }

    .features {
        padding: 60px 0;
    }

    .features h2, .pricing h2 {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        width: 100%;
        gap: 24px;
    }

    .feature-card {
        padding: 28px 20px;
    }

    .feature-icon {
        font-size: 48px;
        padding: 16px;
    }

    .pricing {
        padding: 60px 0;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .pricing-card.featured {
        transform: scale(1);
    }

    .pricing-card.featured:hover {
        transform: translateY(-4px);
    }

    .landing-footer {
        padding: 32px 0;
    }

    /* Auth pages */
    .auth-container {
        padding: 40px 16px;
    }

    .auth-card {
        padding: 32px 20px;
        max-width: 100%;
    }

    .auth-card h1 {
        font-size: 28px;
    }

    .auth-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .language-selector {
        gap: 4px;
    }

    .lang-btn {
        padding: 4px 8px;
        font-size: 11px;
    }

    /* Navigation */
    .nav-group {
        margin-bottom: 12px;
    }

    .nav-link {
        padding: 12px 16px;
    }

    /* Filters */
    .filters {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
    }

    .filter-group {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Mobile Landscape & Small Tablets: 481px-767px */
@media (min-width: 481px) and (max-width: 767px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets: 768px-1023px */
@media (min-width: 768px) and (max-width: 1023px) {
    /* Sidebar can be toggled */
    .sidebar {
        width: 220px;
    }

    .main-content {
        margin-left: 220px;
        padding: 20px;
    }

    /* Dashboard */
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Tables - reduce padding */
    .table th,
    .table td {
        padding: 10px;
        font-size: 13px;
    }

    /* Forms - 2 columns where appropriate */
    .form-row {
        flex-direction: row;
        gap: 12px;
    }

    /* Cards */
    .card-header {
        flex-direction: row;
        align-items: center;
    }

    /* Modals - not full screen */
    .modal-content {
        margin: 40px auto;
        max-width: 90%;
        border-radius: 8px;
    }
}

/* Tablet Portrait Specific: 768px-899px */
@media (min-width: 768px) and (max-width: 899px) and (orientation: portrait) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet Landscape: 900px-1023px */
@media (min-width: 900px) and (max-width: 1023px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Medium Desktop: 1024px-1279px */
@media (min-width: 1024px) and (max-width: 1279px) {
    .sidebar {
        width: var(--sidebar-width);
    }

    .main-content {
        margin-left: var(--sidebar-width);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mobile-menu-btn {
        display: none;
    }
}

/* Large Desktop: 1280px+ */
@media (min-width: 1280px) {
    .sidebar {
        width: var(--sidebar-width);
    }

    .main-content {
        margin-left: var(--sidebar-width);
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mobile-menu-btn {
        display: none;
    }
}

/* Touch device enhancements */
[data-touch="true"] {
    /* Larger touch targets */
}

[data-touch="true"] .table tbody tr {
    cursor: pointer;
}

[data-touch="true"] .btn {
    padding: 10px 16px;
    min-height: 44px; /* WCAG 2.1 Level AAA compliance */
}

[data-touch="true"] .btn-sm {
    padding: 8px 12px;
    min-height: 40px;
}

[data-touch="true"] .table .btn-sm {
    padding: 6px 10px;
    min-height: 38px;
}

/* Orientation specific */
[data-orientation="landscape"] .modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* Print styles */
/* Search highlight animation */
@keyframes searchHighlightBlink {
    0%, 100% {
        background-color: rgba(5, 150, 105, 0.25);
    }
    50% {
        background-color: rgba(5, 150, 105, 0.15);
    }
}

.search-highlight {
    background-color: rgba(5, 150, 105, 0.25);
    animation: searchHighlightBlink 0.8s ease-in-out 5;
    position: relative;
    cursor: pointer;
}

.search-highlight td {
    position: relative;
}

/* Password Requirements Display */
.password-requirements {
    margin-top: 12px;
    padding: 12px;
    background-color: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 13px;
}

.password-requirements-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.password-requirements-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.password-requirements-list .requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.password-requirements-list .requirement .req-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 12px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.password-requirements-list .requirement.valid {
    color: var(--success);
}

.password-requirements-list .requirement.valid .req-icon {
    color: var(--success);
    font-weight: bold;
}

@media print {
    .sidebar,
    .mobile-menu-btn,
    .filters,
    .btn {
        display: none !important;
    }

    .main-content {
        margin: 0;
        padding: 0;
    }

    .table {
        font-size: 11px;
    }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    min-width: 300px;
    max-width: 500px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease-in-out;
    z-index: 10000;
    pointer-events: auto;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.toast-error {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

.toast-warning {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}

.toast-info {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
}

/* Mobile toast */
@media (max-width: 767px) {
    .toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        min-width: auto;
        max-width: none;
    }
}
