/* Modern Electronics Theme CSS */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-bg: #0f172a;
    --darker-bg: #020617;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    overflow: visible;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    width: 100%;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 100%;
    overflow: hidden;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    flex-shrink: 0;
    max-width: 200px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
}

/* Navigation */
.nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: calc(100% - 250px);
    overflow: hidden;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    border-radius: 6px;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
}

/* Main Content */
.main {
    padding: 2rem 0;
    width: 100%;
    min-height: calc(100vh - 200px);
    position: relative;
    z-index: 1;
    overflow: visible;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: visible;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    position: relative;
    z-index: 2;
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.5rem;
    overflow: visible;
}

/* Dashboard specific styles */
.dashboard-card {
    overflow: visible !important;
    margin-bottom: 2rem;
}

.dashboard-card .card-body {
    overflow: visible !important;
    padding-bottom: 2rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.required {
    color: #dc2626 !important;
    font-weight: bold !important;
    margin-left: 0.25rem;
}

.form-label .required {
    color: #dc2626 !important;
    font-weight: bold !important;
}

label .required,
.form-label .required,
.form-group .form-label .required {
    color: #dc2626 !important;
    font-weight: bold !important;
}

/* Erősebb specifikusság a required csillagokhoz */
.form-group label .required,
.form-group .form-label .required,
.form-group .form-label span.required {
    color: #dc2626 !important;
    font-weight: bold !important;
    margin-left: 0.25rem !important;
}

/* Új required field osztály */
.required-field {
    color: #dc2626 !important;
    font-weight: bold !important;
    margin-left: 0.25rem !important;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Form mezők további stílusok */
.form-control::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.form-control:disabled {
    background-color: var(--light-bg);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Textarea speciális stílusok */
.form-control[rows] {
    resize: vertical;
    min-height: 80px;
}

/* Number input stílusok */
.form-control[type="number"] {
    -moz-appearance: textfield;
}

.form-control[type="number"]::-webkit-outer-spin-button,
.form-control[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* URL input stílusok */
.form-control[type="url"] {
    font-family: monospace;
}

/* Email input stílusok */
.form-control[type="email"] {
    font-family: inherit;
}

.form-control.error {
    border-color: var(--danger-color);
}

.form-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.form-error {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--primary-color);
    color: white;
    white-space: nowrap;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    touch-action: manipulation;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

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

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

.btn-success {
    background: var(--success-color);
}

.btn-warning {
    background: var(--warning-color);
}

.btn-danger {
    background: var(--danger-color);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table th,
.table td {
    padding: 1rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    word-wrap: break-word;
    vertical-align: middle;
    line-height: 1.5;
}

.table th {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid var(--accent-color);
}

.table th a {
    color: white !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table th a:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.5);
}

.table tbody tr:hover {
    background: rgba(37, 99, 235, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

.table td strong {
    color: var(--text-primary);
    font-weight: 600;
}

.table td small {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin: 1rem 0;
}

.table-striped tbody tr:nth-child(odd) {
    background: white;
}

.table-striped tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.7);
}

.table-hover tbody tr:hover {
    background: rgba(37, 99, 235, 0.08) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* Table dark header override */
.table thead.table-dark th {
    background: linear-gradient(135deg, #1e293b, #334155) !important;
    color: white;
    border-color: #475569;
}

/* Special table cell types */
.table td .btn-group {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.table td .badge {
    margin: 0.125rem;
}

/* Compact table variant */
.table-compact th,
.table-compact td {
    padding: 0.5rem;
    font-size: 0.85rem;
}

/* Wide table for better spacing */
.table-wide th,
.table-wide td {
    padding: 1.25rem 1rem;
}

/* Lists */
ul, ol {
    padding-left: 1.5rem;
    margin: 1rem 0;
    line-height: 1.6;
}

ul li, ol li {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

ul li:last-child, ol li:last-child {
    margin-bottom: 0;
}

/* Custom list styles */
.list-group {
    display: flex;
    flex-direction: column;
    margin: 1rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: white;
}

.list-group-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    background: white;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

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

.list-group-item:hover {
    background: rgba(37, 99, 235, 0.05);
    transform: translateX(4px);
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
}

.list-group-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    font-weight: 600;
}

.list-group-item.active:hover {
    transform: translateX(0);
    border-left: none;
    padding-left: 1.25rem;
}

/* List group flush (no borders) */
.list-group-flush .list-group-item {
    border-left: none;
    border-right: none;
    border-radius: 0;
}

.list-group-flush .list-group-item:first-child {
    border-top: none;
}

/* Horizontal list group */
.list-group-horizontal {
    flex-direction: row;
}

.list-group-horizontal .list-group-item {
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.list-group-horizontal .list-group-item:last-child {
    border-right: none;
}

/* Simple list styling */
.list-unstyled {
    list-style: none;
    padding-left: 0;
}

.list-inline {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Clean bullet lists */
ul.clean-list {
    list-style: none;
    padding-left: 0;
}

ul.clean-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

ul.clean-list li:before {
    content: '•';
    color: var(--primary-color);
    font-size: 1.2em;
    position: absolute;
    left: 0;
    top: 0;
}

/* Numbered lists with custom styling */
ol.custom-numbered {
    counter-reset: custom-counter;
    list-style: none;
    padding-left: 0;
}

ol.custom-numbered li {
    counter-increment: custom-counter;
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1rem;
}

ol.custom-numbered li:before {
    content: counter(custom-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: var(--primary-color);
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Card-based lists */
.card-list {
    display: grid;
    gap: 1rem;
    margin: 1rem 0;
}

.card-list-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card-list-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.card-list-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card-list-item:hover:before {
    transform: scaleX(1);
}

.card-list-item h3, .card-list-item h4, .card-list-item h5 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.card-list-item p {
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.6;
}

/* Grid variants for card lists */
.card-list-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card-list-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card-list-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Compact card list */
.card-list-compact .card-list-item {
    padding: 1rem;
}

/* Data list styling */
.data-list {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin: 1rem 0;
}

.data-list-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

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

.data-list-item:hover {
    background: var(--light-bg);
}

.data-list-label {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 120px;
    margin-right: 1rem;
}

.data-list-value {
    color: var(--text-secondary);
    flex: 1;
}

/* Action lists */
.action-list {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin: 1rem 0;
}

.action-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-primary);
}

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

.action-list-item:hover {
    background: var(--light-bg);
    transform: translateX(4px);
    padding-left: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.action-list-content {
    flex: 1;
}

.action-list-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.action-list-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.action-list-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out;
}

.badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.badge-secondary {
    background: rgba(130, 130, 130, 0.8);;
    color: white;
    box-shadow: 0 2px 4px rgba(130, 130, 130, 0.8);
}

.badge-secondary:hover {
    background: rgba(100, 100, 100, 0.8);;
    box-shadow: 0 2px 4px rgba(130, 130, 130, 0.8);
}

.badge-success {
    background: var(--success-color);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.badge-success:hover {
    background: #059669;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
}

.badge-warning {
    background: var(--warning-color);
    color: white;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.badge-warning:hover {
    background: #d97706;
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.4);
}

.badge-danger {
    background: var(--danger-color);
    color: white;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.badge-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4);
}

.badge-info {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.badge-info:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.4);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--primary-color);
}

/* Grid */
.grid {
    display: grid;
    gap: 1.5rem;
    width: 100%;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

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

.grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.grid-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }

/* Responsive - Mobile First Approach */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .logo {
        font-size: 1.25rem !important;
    }
    
    .logo-icon {
        width: 28px !important;
        height: 28px !important;
    }
    
    .nav {
        gap: 0.5rem !important;
        width: 100% !important;
        justify-content: center !important;
    }
    
    .nav-link {
        font-size: 0.8rem !important;
        padding: 0.25rem 0.5rem !important;
        flex: 1;
        justify-content: center;
        text-align: center;
    }
    
    .card {
        border-radius: 12px !important;
    }
    
    .card-body {
        padding: 0.75rem !important;
    }
    
    .card-header {
        padding: 0.75rem !important;
    }
    
    .btn {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8rem !important;
        width: 100%;
        justify-content: center;
    }
    
    .form-control {
        padding: 0.5rem 0.75rem !important;
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
    
    .container {
        padding: 0 0.25rem !important;
    }
    
    /* Mobile table optimizations */
    .table-responsive {
        font-size: 0.75rem !important;
        border-radius: 8px !important;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem !important;
        font-size: 0.75rem !important;
    }
    
    .table th {
        font-size: 0.7rem !important;
        letter-spacing: 0.25px !important;
    }
    
    /* Mobile list optimizations */
    .list-group-item {
        padding: 0.75rem !important;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-list-2,
    .card-list-3,
    .card-list-4 {
        grid-template-columns: 1fr !important;
    }
    
    .card-list-item {
        padding: 1rem !important;
    }
    
    .data-list-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.75rem !important;
    }
    
    .data-list-label {
        min-width: auto;
        margin-right: 0;
        margin-bottom: 0.25rem;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-light);
    }
    
    .data-list-value {
        font-size: 0.9rem;
    }
    
    .action-list-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 0.75rem !important;
    }
    
    .action-list-meta {
        margin-top: 0.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4,
    .grid-5,
    .grid-6 {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }
    
    .header-content {
        flex-direction: column !important;
        gap: 1rem !important;
        padding: 1rem 0 !important;
    }
    
    .main {
        padding: 1rem 0 !important;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column !important;
        gap: 1rem !important;
        padding: 1rem 0 !important;
    }
    
    .nav {
        gap: 0.5rem !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .nav-link {
        font-size: 0.875rem !important;
        padding: 0.5rem !important;
        white-space: nowrap !important;
    }
    
    .logo {
        max-width: 100% !important;
        justify-content: center !important;
    }
    
    .grid-2,
    .grid-3,
    .grid-4,
    .grid-5,
    .grid-6 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* Tablet table optimizations */
    .table {
        font-size: 0.875rem !important;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem !important;
    }
    
    .table th {
        font-size: 0.8rem !important;
    }
    
    /* Tablet list optimizations */
    .card-list-2 {
        grid-template-columns: 1fr !important;
    }
    
    .card-list-3,
    .card-list-4 {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    }
    
    .list-group-item {
        padding: 1rem !important;
    }
    
    .data-list-item {
        padding: 1rem !important;
    }
    
    .action-list-item {
        padding: 1rem !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .card-header {
        padding: 1rem !important;
    }
    
    .btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.875rem !important;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem !important;
        font-size: 1rem !important;
    }
    
    .container {
        padding: 0 0.5rem !important;
    }
    
    .main {
        padding: 1rem 0 !important;
    }
    
    .form-control {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-5, .grid-6 {
        grid-template-columns: repeat(3, 1fr);
    }
    .container {
        max-width: 95%;
    }
}

/* Electronics theme specific - Simplified */
.electronics-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* Additional responsive utilities */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

@media (max-width: 768px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
}

@media (max-width: 480px) {
    .d-sm-none { display: none !important; }
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
} 

/* Global Modal Styles */
/* Ensure modals are always above header */
.modal {
    display: none;
    position: fixed;
    z-index: 9999 !important;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10000 !important;
}

.modal-header {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.modal-body {
    padding: 1rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    position: sticky;
    bottom: 0;
    background: white;
    z-index: 1;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.btn-close:hover {
    background-color: #f8f9fa;
    color: #495057;
}

/* Dashboard buttons container */
.dashboard-buttons {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.dashboard-buttons .grid-3 {
    width: 100%;
    max-width: 100%;
}

/* Admin dashboard buttons responsive */
@media (max-width: 1400px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .btn {
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem !important;
        justify-content: center;
        text-align: center;
        min-height: 44px; /* Better touch targets */
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8rem !important;
    }
}