/* Teron Admin Portal Styles */

/* Dark Theme (Default) */
:root {
    --teron-dark: #1a1a1a;
    --teron-darker: #0d0d0d;
    --teron-orange: #ff6b35;
    --teron-orange-hover: #e55a2b;
    --teron-white: #ffffff;
    --teron-gray: #999999;
    --teron-light-gray: #f5f5f5;
    --teron-border: #333333;
    --teron-success: #28a745;
    --teron-error: #dc3545;
    --teron-warning: #ffc107;
    
    /* Theme-specific variables */
    --bg-primary: linear-gradient(135deg, var(--teron-darker) 0%, #0f0f0f 50%, var(--teron-dark) 100%);
    --bg-secondary: linear-gradient(135deg, var(--teron-dark) 0%, #1f1f1f 100%);
    --text-primary: var(--teron-white);
    --text-secondary: var(--teron-gray);
    --border-color: var(--teron-border);
    --card-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    --input-bg: rgba(255, 255, 255, 0.1);
    --hover-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.08) 100%);
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 10px 25px rgba(0, 0, 0, 0.2), 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Light Theme */
[data-theme="light"] {
    --teron-dark: #f1f3f4;
    --teron-darker: #fafbfc;
    --teron-orange: #ff6b35;
    --teron-orange-hover: #e55a2b;
    --teron-white: #1a1a1a;
    --teron-gray: #5f6368;
    --teron-light-gray: #e8eaed;
    --teron-border: #dadce0;
    --teron-success: #137333;
    --teron-error: #d93025;
    --teron-warning: #f9ab00;
    
    /* Theme-specific variables */
    --bg-primary: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 50%, #f1f3f4 100%);
    --bg-secondary: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --border-color: #dadce0;
    --card-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 251, 252, 0.9) 100%);
    --input-bg: #ffffff;
    --hover-bg: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    --shadow-light: 0 1px 3px rgba(60, 64, 67, 0.2), 0 1px 2px rgba(60, 64, 67, 0.1);
    --shadow-medium: 0 4px 6px rgba(60, 64, 67, 0.1), 0 2px 4px rgba(60, 64, 67, 0.06);
    --shadow-heavy: 0 10px 25px rgba(60, 64, 67, 0.1), 0 4px 10px rgba(60, 64, 67, 0.06);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Login Page Styles */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-heavy);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 10px;
}

.logo-text {
    font-size: 24px;
    font-weight: 600;
    color: var(--teron-white);
    margin-bottom: 5px;
}

.logo-subtitle {
    font-size: 14px;
    color: var(--teron-gray);
    margin-bottom: 20px;
}

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

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

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

.form-input:focus {
    outline: none;
    border-color: var(--teron-orange);
    background: var(--hover-bg);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

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

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

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

.btn-primary:hover {
    background: var(--teron-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.3);
}

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

/* Alert Styles */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid;
}

.alert-error {
    background: rgba(220, 53, 69, 0.1);
    border-left-color: var(--teron-error);
    color: #ff6b6b;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    border-left-color: var(--teron-success);
    color: #51cf66;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border-left-color: var(--teron-warning);
    color: #ffd43b;
}

/* Light Theme Alert Improvements */
[data-theme="light"] .alert-error {
    background: rgba(220, 53, 69, 0.15);
    border-left-color: #d93025;
    color: #c5221f;
    font-weight: 500;
}

[data-theme="light"] .alert-success {
    background: rgba(40, 167, 69, 0.15);
    border-left-color: #137333;
    color: #0f5132;
    font-weight: 500;
}

[data-theme="light"] .alert-warning {
    background: rgba(255, 193, 7, 0.2);
    border-left-color: #f9ab00;
    color: #b45309;
    font-weight: 500;
}

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

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

/* Responsive Design */
@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .form-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Dashboard Styles */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-light);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header-logo {
    height: 40px;
    transition: opacity 0.3s ease;
}

/* Logo switching for themes */
.header-logo-light {
    display: block;
}

.header-logo-dark {
    display: none;
}

[data-theme="light"] .header-logo-light {
    display: none;
}

[data-theme="light"] .header-logo-dark {
    display: block;
}

.main-nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.nav-link:hover {
    background: var(--hover-bg);
    color: var(--teron-orange);
}

.nav-link.active {
    background: rgba(255, 107, 53, 0.1);
    color: var(--teron-orange);
    border-bottom-color: var(--teron-orange);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-name {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

.btn-logout {
    background: transparent;
    border: 1px solid var(--teron-error);
    color: var(--teron-error);
    padding: 8px 16px;
    font-size: 12px;
    width: auto;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: var(--teron-error);
    color: var(--teron-white);
    transform: none;
}

.btn-logout:hover {
    background: var(--teron-error);
    border-color: var(--teron-error);
    transform: none;
}

.main-content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }

/* Form Validation */
.form-input.error {
    border-color: var(--teron-error);
    background: rgba(220, 53, 69, 0.1);
}

.form-error {
    color: var(--teron-error);
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Table Styles */
.table-container {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-top: 20px;
    box-shadow: var(--shadow-light);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

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

.table th {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Light theme table headers */
[data-theme="light"] .table th {
    background: #f8f9fa;
}

.table td {
    color: var(--text-primary);
    font-size: 14px;
}

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

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

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: rgba(40, 167, 69, 0.2);
    color: var(--teron-success);
    border: 1px solid var(--teron-success);
}

.status-disabled {
    background: rgba(220, 53, 69, 0.2);
    color: var(--teron-error);
    border: 1px solid var(--teron-error);
}

.status-unknown {
    background: rgba(255, 193, 7, 0.2);
    color: var(--teron-warning);
    border: 1px solid var(--teron-warning);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    width: auto;
    min-width: auto;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--hover-bg);
    border-color: var(--text-primary);
}

.btn-danger {
    background: var(--teron-error);
    color: var(--teron-white);
    border: 1px solid var(--teron-error);
}

.btn-danger:hover {
    background: #c82333;
    border-color: #c82333;
}

/* Search and Filter Bar */
.filter-bar {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 12px;
    color: var(--teron-gray);
    font-weight: 500;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    margin-top: 17px; /* Align with input field (label height + gap) */
}

/* Right-align Actions column in tables */
.table th.actions-column,
.table td.actions-column {
    text-align: right !important;
}

.table td.actions-column .action-buttons {
    justify-content: flex-end;
}

/* Section header with status indicator */
.section-header-with-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--teron-border);
    padding-bottom: 10px;
}

.section-header-with-status .section-title {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.filter-input {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--teron-border);
    border-radius: 6px;
    color: var(--teron-white);
    font-size: 14px;
    min-width: 200px;
}

.filter-input option {
    background: #2a2a2a;
    color: #ffffff;
}

[data-theme="light"] .filter-input {
    background: #ffffff;
    color: #202124;
    border-color: #dadce0;
}

[data-theme="light"] .filter-input option {
    background: #ffffff;
    color: #202124;
}

.filter-select {
    padding: 8px 12px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    min-width: 150px;
}

.filter-select option {
    background: #2a2a2a;
    color: #ffffff;
}

[data-theme="light"] .filter-select option {
    background: #ffffff;
    color: #202124;
}

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

.pagination-btn,
.pagination-number {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--teron-border);
    border-radius: 6px;
    color: var(--teron-white);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination-btn:hover,
.pagination-number:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--teron-orange);
}

.pagination-number.active {
    background: var(--teron-orange);
    border-color: var(--teron-orange);
    color: var(--teron-white);
}

.pagination-dots {
    color: var(--teron-gray);
    padding: 8px 4px;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.page-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.page-actions form {
    margin: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--teron-gray);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--teron-white);
}

.empty-state-text {
    font-size: 14px;
    line-height: 1.5;
}

/* Loading State */
.loading-overlay {
    position: relative;
}

.loading-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Tables */
@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-input,
    .filter-select {
        min-width: auto;
        width: 100%;
    }
    
    .page-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .action-buttons {
        justify-content: center;
    }
    
    .main-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-left {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

/* Details Page Styles */
.details-container {
    /* No max-width restriction - use full main-content width like tables */
}

.details-section {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-light);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

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

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-item-full {
    grid-column: 1 / -1;
}

.detail-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--teron-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 14px;
    color: var(--teron-white);
    line-height: 1.5;
}

.detail-value code {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    color: var(--teron-orange);
}

/* IP Address List */
.ip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ip-badge {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid var(--teron-orange);
    color: var(--teron-orange);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Form Styles */
.form-container {
    /* No max-width restriction - use full main-content width like tables and details */
}

.form-section {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-light);
    transition: background 0.3s ease, border-color 0.3s ease;
}

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

.form-group-full {
    grid-column: 1 / -1;
}

.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--teron-border);
    border-radius: 8px;
    color: var(--teron-white);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--teron-orange);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

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

.form-select:focus {
    outline: none;
    border-color: var(--teron-orange);
    background: var(--hover-bg);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-select option {
    background: #2a2a2a;
    color: #ffffff;
}

[data-theme="light"] .form-select option {
    background: #ffffff;
    color: #202124;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--teron-border);
}

.form-help {
    font-size: 12px;
    color: var(--teron-gray);
    margin-top: 5px;
    line-height: 1.4;
}

/* Responsive Details */
@media (max-width: 768px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .details-container,
    .form-container {
        max-width: none;
    }
}

/* User Management Specific Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: var(--hover-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--teron-orange);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--teron-gray);
    font-weight: 500;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: rgba(255, 107, 53, 0.2);
    color: var(--teron-orange);
    border: 1px solid var(--teron-orange);
}

.badge-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--teron-gray);
    border: 1px solid var(--teron-border);
}

/* Status inactive for user management */
.status-inactive {
    background: rgba(220, 53, 69, 0.2);
    color: var(--teron-error);
    border: 1px solid var(--teron-error);
}

/* Permissions List */
.permissions-list ul {
    list-style: none;
    padding: 0;
}

.permissions-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--teron-border);
    color: var(--teron-white);
    position: relative;
    padding-left: 20px;
}

.permissions-list li:last-child {
    border-bottom: none;
}

.permissions-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--teron-success);
    font-weight: bold;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item label {
    font-size: 12px;
    font-weight: 600;
    color: var(--teron-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    font-size: 14px;
    color: var(--teron-white);
}

/* Checkbox Styles */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--teron-white);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--teron-orange);
}

/* Form Description */
.form-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-style: italic;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

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

.text-muted {
    color: var(--teron-gray);
}

.highlight {
    color: var(--teron-orange);
    font-weight: 600;
}

/* Date Filter Styles */
.filter-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid var(--teron-border);
    padding: 20px;
    margin-bottom: 24px;
}

.date-filter-form {
    display: flex;
    align-items: end;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.custom-dates {
    display: flex;
    gap: 15px;
    align-items: end;
}

.date-info {
    font-size: 14px;
    color: var(--teron-gray);
    padding-top: 15px;
    border-top: 1px solid var(--teron-border);
}

/* Transaction Status Styles */
.status-pending {
    background: rgba(255, 193, 7, 0.2);
    color: var(--teron-warning);
    border: 1px solid var(--teron-warning);
}

.status-cancelled {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
    border: 1px solid #6c757d;
}

.status-unknown {
    background: rgba(255, 255, 255, 0.1);
    color: var(--teron-gray);
    border: 1px solid var(--teron-border);
}

/* Responsive User Management */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .date-filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .custom-dates {
        flex-direction: column;
    }
}

/* Breadcrumb Navigation */
.breadcrumb-container {
    margin-bottom: 20px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--teron-gray);
}

.breadcrumb-link {
    color: var(--teron-orange);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: var(--teron-orange-hover);
}

.breadcrumb-separator {
    color: var(--teron-gray);
    font-weight: 600;
}

.breadcrumb-current {
    color: var(--teron-white);
    font-weight: 500;
}

@media (max-width: 768px) {
    .breadcrumb {
        flex-wrap: wrap;
        gap: 4px;
    }
}

/* Transaction Statistics */
.stats-container {
    margin-bottom: 30px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--teron-orange);
    margin-bottom: 8px;
}

.stat-card.stat-success .stat-value {
    color: var(--teron-success);
}

.stat-card.stat-error .stat-value {
    color: var(--teron-error);
}

/* Filter Group Inline */
.filter-group-inline {
    display: flex;
    gap: 15px;
    align-items: end;
}

/* Status badges for transactions */
.status-warning {
    background: rgba(255, 193, 7, 0.2);
    color: var(--teron-warning);
    border: 1px solid var(--teron-warning);
}

.status-pending {
    background: rgba(255, 193, 7, 0.2);
    color: var(--teron-warning);
    border: 1px solid var(--teron-warning);
}

.status-cancelled {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
    border: 1px solid #6c757d;
}

.status-unknown {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
    border: 1px solid #6c757d;
}

/* Transaction Flags */
.flags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.flag-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--teron-border);
}

.flag-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.flag-success {
    background: rgba(40, 167, 69, 0.2);
    color: var(--teron-success);
    border: 2px solid var(--teron-success);
}

.flag-error {
    background: rgba(220, 53, 69, 0.2);
    color: var(--teron-error);
    border: 2px solid var(--teron-error);
}

.flag-warning {
    background: rgba(255, 193, 7, 0.2);
    color: var(--teron-warning);
    border: 2px solid var(--teron-warning);
}

.flag-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--teron-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Language Selector */
.language-selector {
    display: flex;
    align-items: center;
}

.language-select {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.language-select:focus {
    outline: none;
    border-color: var(--teron-orange);
    background: var(--hover-bg);
}

.language-select option {
    background: #2a2a2a;
    color: #ffffff;
}

[data-theme="light"] .language-select option {
    background: #ffffff;
    color: #202124;
}




/* Header Profile Button */
.header-user .btn-secondary {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.header-user .btn-secondary:hover {
    background: var(--hover-bg);
    border-color: var(--teron-orange);
    color: var(--teron-orange);
}


/* Language Flags */
.language-flag {
    width: 18px;
    height: 12px;
    border-radius: 2px;
    display: inline-block;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Flag backgrounds using CSS */
.flag-sr-rs, .flag-sr-cyrl-rs {
    background: linear-gradient(to bottom, #c6363c 33%, #1c4b9c 33%, #1c4b9c 66%, #ffffff 66%);
}

.flag-en-us {
    background: linear-gradient(to bottom, #b22234 0%, #b22234 7.7%, #ffffff 7.7%, #ffffff 15.4%, #b22234 15.4%, #b22234 23.1%, #ffffff 23.1%, #ffffff 30.8%, #b22234 30.8%, #b22234 38.5%, #ffffff 38.5%, #ffffff 46.2%, #b22234 46.2%, #b22234 53.8%, #ffffff 53.8%, #ffffff 61.5%, #b22234 61.5%, #b22234 69.2%, #ffffff 69.2%, #ffffff 76.9%, #b22234 76.9%, #b22234 84.6%, #ffffff 84.6%, #ffffff 92.3%, #b22234 92.3%);
    position: relative;
}

.flag-en-us::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 53.8%;
    background: #3c3b6e;
}

.flag-ru-ru {
    background: linear-gradient(to bottom, #ffffff 33%, #0039a6 33%, #0039a6 66%, #d52b1e 66%);
}

.flag-uk-ua {
    background: linear-gradient(to bottom, #005bbb 50%, #ffd500 50%);
}

.flag-tr-tr {
    background: #e30a17;
    position: relative;
}

.flag-tr-tr::before {
    content: "☪";
    position: absolute;
    color: white;
    font-size: 8px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.flag-sq-al {
    background: #e41e20;
    position: relative;
}

.flag-sq-al::before {
    content: "🦅";
    position: absolute;
    font-size: 6px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.flag-de-de {
    background: linear-gradient(to bottom, #000000 33%, #dd0000 33%, #dd0000 66%, #ffce00 66%);
}

.flag-fr-fr {
    background: linear-gradient(to right, #0055a4 33%, #ffffff 33%, #ffffff 66%, #ef4135 66%);
}

.flag-es-es {
    background: linear-gradient(to bottom, #aa151b 25%, #f1bf00 25%, #f1bf00 75%, #aa151b 75%);
}

.flag-it-it {
    background: linear-gradient(to right, #009246 33%, #ffffff 33%, #ffffff 66%, #ce2b37 66%);
}

.flag-no-no {
    background: #ba0c2f;
    position: relative;
}

.flag-no-no::before {
    content: "";
    position: absolute;
    top: 0;
    left: 25%;
    width: 12.5%;
    height: 100%;
    background: #ffffff;
}

.flag-no-no::after {
    content: "";
    position: absolute;
    top: 37.5%;
    left: 0;
    width: 100%;
    height: 25%;
    background: #ffffff;
}

.flag-sv-se {
    background: #006aa7;
    position: relative;
}

.flag-sv-se::before {
    content: "";
    position: absolute;
    top: 0;
    left: 25%;
    width: 12.5%;
    height: 100%;
    background: #fecc00;
}

.flag-sv-se::after {
    content: "";
    position: absolute;
    top: 37.5%;
    left: 0;
    width: 100%;
    height: 25%;
    background: #fecc00;
}

.flag-da-dk {
    background: #c8102e;
    position: relative;
}

.flag-da-dk::before {
    content: "";
    position: absolute;
    top: 0;
    left: 25%;
    width: 12.5%;
    height: 100%;
    background: #ffffff;
}

.flag-da-dk::after {
    content: "";
    position: absolute;
    top: 37.5%;
    left: 0;
    width: 100%;
    height: 25%;
    background: #ffffff;
}

.flag-zh-cn {
    background: #de2910;
    position: relative;
}

.flag-zh-cn::before {
    content: '★';
    position: absolute;
    color: #ffde00;
    font-size: 8px;
    left: 20%;
    top: 20%;
}

/* Custom select styling for flags */
.language-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--teron-border);
    border-radius: 6px;
    color: var(--teron-white);
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23ffffff" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    padding-right: 30px;
}


/* Custom Language Select */
.custom-select {
    position: relative;
    min-width: 140px;
}

.select-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-size: 12px;
}

.select-trigger:hover {
    background: var(--hover-bg);
    border-color: var(--teron-orange);
}

.select-trigger.active {
    border-color: var(--teron-orange);
    background: var(--hover-bg);
}

.select-text {
    flex: 1;
}

.select-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.select-trigger.active .select-arrow {
    transform: rotate(180deg);
}

.select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-medium);
}

.select-options.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.select-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 12px;
    transition: all 0.2s ease;
    background: transparent;
}

.select-option:hover {
    background: rgba(255, 107, 53, 0.1);
    color: var(--teron-orange);
}

.select-option:first-child {
    border-radius: 6px 6px 0 0;
}

.select-option:last-child {
    border-radius: 0 0 6px 6px;
}

/* Dark theme dropdown styling */
[data-theme="dark"] .select-options,
:root .select-options {
    background: #2a2a2a;
    border-color: #444444;
}

[data-theme="dark"] .select-option,
:root .select-option {
    color: #ffffff;
}

[data-theme="dark"] .select-option:hover,
:root .select-option:hover {
    background: rgba(255, 107, 53, 0.2);
    color: #ff6b35;
}

/* Light theme dropdown styling */
[data-theme="light"] .select-options {
    background: #ffffff;
    border-color: #dadce0;
}

[data-theme="light"] .select-option {
    color: #202124;
}

[data-theme="light"] .select-option:hover {
    background: rgba(255, 107, 53, 0.1);
    color: #ff6b35;
}

/* Header Icons */
.header-icon {
    display: flex;
    align-items: center;
}

.btn-icon {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 8px 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    position: relative;
    z-index: 10;
}

.btn-icon:hover {
    background: var(--hover-bg);
    border-color: var(--teron-orange);
    transform: scale(1.05);
}

.header-icon .fas {
    transition: transform 0.3s ease;
    font-size: 16px;
    color: #ffffff; /* Light icon for dark theme */
}

/* Light theme - use dark icon */
[data-theme="light"] .header-icon .fas {
    color: #1a1a1a;
}


/* Enhanced transitions for theme switching */
* {
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Improved light theme card styling */
[data-theme="light"] .table-container,
[data-theme="light"] .details-section,
[data-theme="light"] .form-section,
[data-theme="light"] .stat-card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(218, 220, 224, 0.8);
}

/* Improved dark theme card styling */
[data-theme="dark"] .table-container,
[data-theme="dark"] .details-section,
[data-theme="dark"] .form-section,
[data-theme="dark"] .stat-card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(51, 51, 51, 0.8);
}

/* Better focus states for light theme */
[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-select:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15), var(--shadow-light);
}

/* Better focus states for dark theme */
[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .form-select:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2), var(--shadow-light);
}

/* Copy to Clipboard Icon */
.copy-icon {
    cursor: pointer;
    margin-left: 8px;
    opacity: 0.5;
    transition: all 0.2s ease;
    font-size: 14px;
    vertical-align: middle;
    color: var(--text-secondary);
}

.copy-icon:hover {
    opacity: 1;
    color: var(--teron-orange);
    transform: scale(1.1);
}

.copy-success {
    color: var(--teron-success) !important;
    opacity: 1 !important;
}

.copy-error {
    color: var(--teron-error) !important;
    opacity: 1 !important;
}

code {
    display: inline-flex;
    align-items: center;
}

