/* RepairCRM Pro - Modern Glassmorphism Styles */

:root {
    /* Default Theme - Soft Ocean */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --background-start: #0f172a;
    --background-end: #1e293b;
    --glass-bg: rgba(15, 23, 42, 0.85);
    --glass-border: rgba(255, 255, 255, 0.15);
    --text-primary: #f8fafc;
    --text-secondary: rgba(248, 250, 252, 0.85);
    --text-muted: rgba(248, 250, 252, 0.65);
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    --hover-overlay: rgba(255, 255, 255, 0.05);
    --active-overlay: rgba(255, 255, 255, 0.1);
}

/* Theme: Midnight Ocean */
body[data-theme="midnight"] {
    --primary-gradient: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #14b8a6 100%);
    --background-start: #0c1222;
    --background-end: #1a2332;
    --glass-bg: rgba(12, 18, 34, 0.85);
    --glass-border: rgba(255, 255, 255, 0.15);
}

/* Theme: Forest Green */
body[data-theme="forest"] {
    --primary-gradient: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    --background-start: #0f1810;
    --background-end: #1a2618;
    --glass-bg: rgba(15, 24, 16, 0.85);
    --glass-border: rgba(16, 185, 129, 0.25);
}

/* Theme: Sunset */
body[data-theme="sunset"] {
    --primary-gradient: linear-gradient(135deg, #f59e0b 0%, #f97316 50%, #ef4444 100%);
    --background-start: #1a1410;
    --background-end: #2a1f18;
    --glass-bg: rgba(26, 20, 16, 0.85);
    --glass-border: rgba(245, 158, 11, 0.25);
}

/* Theme: Royal Purple */
body[data-theme="royal"] {
    --primary-gradient: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
    --background-start: #1a0f2e;
    --background-end: #2a1a3e;
    --glass-bg: rgba(26, 15, 46, 0.85);
    --glass-border: rgba(139, 92, 246, 0.25);
}

/* Theme: Rose Gold */
body[data-theme="rose"] {
    --primary-gradient: linear-gradient(135deg, #ec4899 0%, #db2777 50%, #be185d 100%);
    --background-start: #1f0a14;
    --background-end: #2f1524;
    --glass-bg: rgba(31, 10, 20, 0.85);
    --glass-border: rgba(236, 72, 153, 0.25);
}

/* Theme: Light Mode */
body[data-theme="light"] {
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --background-start: #f8fafc;
    --background-end: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.08);
    --text-primary: #0f172a;
    --text-secondary: rgba(15, 23, 42, 0.7);
    --text-muted: rgba(15, 23, 42, 0.5);
    --hover-overlay: rgba(0, 0, 0, 0.03);
    --active-overlay: rgba(0, 0, 0, 0.06);
}

/* Theme: Arctic */
body[data-theme="arctic"] {
    --primary-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #0e7490 100%);
    --background-start: #0a1419;
    --background-end: #152229;
    --glass-bg: rgba(10, 20, 25, 0.85);
    --glass-border: rgba(6, 182, 212, 0.25);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    line-height: 1.6;
}

.gradient-bg {
    background: linear-gradient(to bottom right, var(--background-start), var(--background-end));
    min-height: 100vh;
    padding: 16px;
    padding-top: 200px;
    transition: background 0.5s ease;
    position: relative;
    z-index: 0;
}

/* Glass morphism effect */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: auto;
}

/* Main content cards should stay below navigation */
.main-content .glass-card {
    z-index: 0;
}

/* Navigation needs to allow dropdown overflow */
.glass-card.navigation {
    overflow: visible !important;
}

/* Header */
.header {
    padding: 16px;
    margin-bottom: 0;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10001 !important;
    margin-left: 16px;
    margin-right: 16px;
}

.app-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

/* Navigation */
.navigation {
    padding: 8px !important;
    margin-bottom: 0 !important;
    overflow: visible !important;
    position: fixed !important;
    top: 70px !important;
    left: 16px !important;
    right: 16px !important;
    z-index: 20000 !important;
}

/* Mobile navigation scroll indicator */
@media (max-width: 768px) {
    .navigation {
        top: 140px !important;
        left: 8px !important;
        right: 8px !important;
    }

    .navigation::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 30px;
        background: linear-gradient(to left, var(--glass-bg), transparent);
        pointer-events: none;
        z-index: 1;
    }
}

/* Very narrow screens (Fold outer screen, narrow phones) */
@media (max-width: 480px) {
    .navigation {
        top: 160px !important;
    }
}

/* Extra narrow screens (Portrait mode on very narrow devices) */
@media (max-width: 380px) {
    .navigation {
        top: 180px !important;
    }
}

.nav-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    flex-wrap: nowrap;
    position: relative;
    z-index: 1;
}

/* Custom scrollbar for navigation */
.nav-tabs::-webkit-scrollbar {
    height: 4px;
}

.nav-tabs::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.nav-tabs::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.nav-tabs::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nav-tab {
    padding: 8px 16px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    color: var(--text-secondary);
    background: transparent;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.nav-tab.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

/* Navigation Dropdown */
.nav-item {
    position: relative !important;
    display: inline-block;
    z-index: 1 !important;
}

.nav-item:hover {
    z-index: 100 !important;
}

.nav-item .nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Prevent transform on dropdown parent tabs to avoid hover gap */
.nav-item:hover .nav-tab {
    transform: none;
    background: rgba(255, 255, 255, 0.1);
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(30, 41, 59, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    border: 2px solid rgba(102, 126, 234, 0.8) !important;
    border-radius: 12px !important;
    min-width: 180px !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6), 0 0 20px rgba(102, 126, 234, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0s 0.15s;
    padding: 8px 0 !important;
    pointer-events: none;
}

/* Arrow pointing to parent button */
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid rgba(102, 126, 234, 0.8);
    z-index: 1;
}

.nav-dropdown::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 22px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(30, 41, 59, 0.98);
    z-index: 2;
}



.nav-item:hover .nav-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    transition-delay: 0s !important;
    pointer-events: auto !important;
}

/* When moved to body, .show class must work standalone */
.nav-dropdown.show {
    opacity: 1 !important;
    visibility: visible !important;
    transition-delay: 0s !important;
    pointer-events: auto !important;
    display: block !important;
}

.nav-dropdown-item {
    display: block !important;
    padding: 12px 20px !important;
    color: rgba(255, 255, 255, 0.95) !important;
    text-decoration: none !important;
    transition: background 0.2s ease;
    font-size: 0.95rem !important;
    white-space: nowrap;
    position: relative;
    line-height: 1.5 !important;
}

.nav-dropdown-item:only-child,
.nav-dropdown-item:first-child:last-child {
    border-radius: 12px;
}

.nav-dropdown-item:first-child:not(:last-child) {
    border-radius: 12px 12px 0 0;
}

.nav-dropdown-item:last-child:not(:first-child) {
    border-radius: 0 0 12px 12px;
}

.nav-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.nav-dropdown-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}


/* Main Content */
.main-content {
    padding: 24px;
    position: relative;
    z-index: 0;
}

/* Buttons */
.btn {
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

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

.btn-primary {
    background: var(--primary-gradient);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.btn-warning {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.btn-danger {
    background: linear-gradient(135deg, #f87171, #ef4444);
}

.btn-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* Forms */
.form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-input {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 12px 16px;
    width: 100%;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

/* Select dropdowns */
select.form-input {
    background: var(--glass-bg);
    color: var(--text-primary);
    cursor: pointer;
}

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

/* For light theme, ensure options have proper contrast */
body[data-theme="light"] select.form-input option {
    background: #ffffff;
    color: #0f172a;
}

.form-input:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.form-help {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

/* Grid Layouts */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

/* Stat Cards */
.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 0;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2rem;
    opacity: 0.8;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-change {
    font-size: 0.8rem;
    color: var(--success);
}

/* Dashboard Sections */
.dashboard-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    z-index: 0;
}

.section-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.section-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.action-icon {
    font-size: 1.5rem;
}

.action-text {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Ticket List */
.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.ticket-number {
    font-weight: bold;
    font-size: 0.9rem;
}

.ticket-status {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
}

.ticket-info {
    margin-bottom: 8px;
}

.ticket-customer {
    font-weight: 500;
    margin-bottom: 2px;
}

.ticket-device {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.ticket-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.ticket-cost {
    font-weight: 500;
    color: var(--success);
}

/* Status Breakdown */
.status-breakdown {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-count {
    font-size: 1.5rem;
    font-weight: bold;
}

.status-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.status-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.status-progress {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Low Stock */
.low-stock-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.low-stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 500;
    margin-bottom: 2px;
}

.item-category {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.item-stock {
    text-align: right;
}

.stock-count {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
}

.low-stock {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.out-of-stock {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin: 16px 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--glass-bg);
    border-radius: 12px;
    overflow: hidden;
}

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

.data-table th {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
    color: var(--text-primary);
}

.data-table td {
    color: var(--text-secondary);
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Status and Priority Badges */
.status-badge,
.priority-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge {
    background: rgba(255, 255, 255, 0.1);
}

/* Actions */
.actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 99999;
    padding: 0;
    overflow-y: auto;
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    width: 100%;
    position: relative;
}

/* For small/medium modals, add padding to overlay */
.modal-content.modal-small,
.modal-content.modal-medium {
    margin: 20px;
}

.modal-medium {
    max-width: 600px;
}

.modal-large {
    max-width: 90vw;
    max-height: 95vh;
    width: 90vw;
    height: auto;
    min-height: 50vh;
    margin-top: 2vh;
    margin-bottom: 2vh;
    display: flex;
    flex-direction: column;
}

.modal-large .modal-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* On mobile, make it slightly larger */
@media (max-width: 768px) {
    .modal-large {
        max-width: 95vw;
        max-height: 96vh;
        width: 95vw;
        margin-top: 2vh;
    }
}

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

.modal-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-secondary);
}

.modal-body {
    color: var(--text-primary);
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    transition: opacity 0.3s ease;
}

.alert-success {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.alert-error {
    background: rgba(248, 113, 113, 0.2);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #f87171;
}

.alert-warning {
    background: rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.alert-info {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    margin-left: 12px;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    margin-bottom: 16px;
    font-size: 1.1rem;
}

/* Page Titles */
.page-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 0;
}

.card:hover {
    transform: translateY(-2px);
}

.card-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card-content {
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 24px 0;
}

.page-link {
    padding: 8px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.page-link.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

.page-dots {
    padding: 8px 4px;
    color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
    .gradient-bg {
        padding: 12px;
        padding-top: 230px;
    }

    .header {
        margin-left: 8px;
        margin-right: 8px;
    }

    .main-content {
        padding: 16px;
    }
}

/* Very narrow screens adjustments */
@media (max-width: 480px) {
    .gradient-bg {
        padding-top: 250px;
    }

    .app-title {
        font-size: 1.1rem !important;
    }
}

/* Extra narrow screens (Fold outer screen) */
@media (max-width: 380px) {
    .gradient-bg {
        padding-top: 270px;
    }

    .app-title {
        font-size: 1rem !important;
    }

    .header {
        padding: 12px !important;
        margin-left: 6px;
        margin-right: 6px;
    }

    .user-button span:first-of-type {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .nav-tabs {
        justify-content: flex-start;
        padding: 4px 0;
    }

    .nav-tab {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .nav-dropdown {
        left: 0;
        right: auto;
        min-width: 160px;
    }

    .nav-dropdown-item {
        font-size: 0.8rem;
        padding: 8px 12px;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .modal-content {
        margin: 10px;
        padding: 20px;
    }
    
    .actions {
        flex-direction: column;
        gap: 4px;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .ticket-header,
    .ticket-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .low-stock-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .item-stock {
        text-align: left;
    }
}

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

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Focus styles for accessibility */
.btn:focus,
.form-input:focus,
.nav-tab:focus {
    outline: 2px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .gradient-bg {
        background: white !important;
        color: black !important;
    }
    
    .glass-card {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
    
    .nav-tabs,
    .btn,
    .actions {
        display: none !important;
    }
}
