/*
 * PrimeFilter Shield - Complete Styles
 * Matching PletX Design: Black, Grey, Orange Only
 */

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*:not(.fa):not(.fas):not(.far):not(.fal):not(.fab):not([class*="fa-"]) {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

:root {
    /* Colors - Dark, Grey, True Orange */
    --primary-orange: #f97316;
    --primary-orange-dark: #ea580c;
    --primary-orange-light: #fb923c;
    --primary-orange-hover: #fdba74;

    /* Backgrounds - Dark like PletX */
    --bg-main: #0A0A0A;
    --bg-dark: #121212;
    --bg-card: #1A1A1A;
    --card-bg: #1A1A1A;
    --bg-sidebar: #0F0F0F;
    --bg-input: #1E1E1E;
    --bg-header: #0F0F0F;

    /* Text */
    --text-white: #FFFFFF;
    --text-primary: #FFFFFF;
    --text-secondary: #a0a0a0;
    --text-grey: #B3B3B3;
    --text-grey-dark: #808080;
    --text-grey-darker: #666666;
    --text-muted: #4D4D4D;

    /* Borders */
    --border-dark: #1E1E1E;
    --border-color: #2A2A2A;
    --border-light: #2A2A2A;
    --border-orange: #f97316;

    /* Status */
    --success: #00C853;
    --danger: #f97316;
    --warning: #f97316;
    --info: #2196F3;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    background-image:
        linear-gradient(rgba(255, 107, 53, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 107, 53, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    color: var(--text-white);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== LAYOUT ========== */
.main-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-content {
    flex: 1;
    padding: 2rem;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    border-right: 1px solid var(--border-dark);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-dark);
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo {
    text-decoration: none;
    display: block;
    text-align: center;
}

.sidebar-logo img {
    max-width: 180px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.sidebar-logo:hover {
    opacity: 0.8;
}

.sidebar-menu {
    padding: 1.5rem 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar-bottom {
    margin-top: auto;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-dark);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--text-grey-dark);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0.25rem 0;
}

.menu-item i {
    width: 24px;
    margin-right: 1rem;
    font-size: 1.15rem;
}

.menu-item:hover {
    background-color: rgba(255, 107, 53, 0.08);
    color: var(--text-grey);
    border-left-color: var(--primary-orange);
}

.menu-item.active {
    background-color: rgba(255, 107, 53, 0.12);
    color: var(--primary-orange);
    border-left-color: var(--primary-orange);
}

.menu-item.logout {
    color: var(--primary-orange);
}

.menu-item.logout:hover {
    background-color: rgba(255, 107, 53, 0.08);
    border-left-color: var(--primary-orange);
}

/* ========== HEADER (Synced with Sidebar) ========== */
.header {
    background-color: var(--bg-header);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-white);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
    color: var(--text-white);
}

.profile-btn:hover {
    background-color: rgba(255, 107, 53, 0.05);
}

.profile-btn i {
    color: var(--text-grey);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}

.user-info {
    text-align: left;
}

.user-name {
    font-weight: 500;
    color: var(--text-white);
    font-size: 0.95rem;
    line-height: 1.2;
}

.user-email {
    font-size: 0.8rem;
    color: var(--text-grey-dark);
    line-height: 1.2;
}

.profile-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 0.5rem;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    padding: 0.5rem 0;
}

.profile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-grey);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.profile-menu-item i {
    width: 18px;
    font-size: 0.95rem;
    color: var(--text-grey-dark);
}

.profile-menu-item:hover {
    background-color: rgba(255, 107, 53, 0.08);
    color: var(--text-white);
}

.profile-menu-item:hover i {
    color: var(--primary-orange);
}

.profile-menu-logout {
    color: var(--primary-orange);
}

.profile-menu-logout:hover {
    background-color: rgba(255, 107, 53, 0.1);
}

.profile-menu-logout:hover i {
    color: var(--primary-orange);
}

.profile-menu-divider {
    height: 1px;
    background-color: var(--border-dark);
    margin: 0.5rem 0;
}

/* ========== FOOTER (Fixed Bottom, Small) ========== */
.footer {
    background-color: var(--bg-sidebar);
    border-top: 1px solid var(--border-dark);
    padding: 1rem 2rem;
    text-align: center;
    color: var(--text-grey-dark);
    font-size: 0.85rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.footer.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ========== CARDS ========== */
.card {
    background-color: var(--bg-card);
    border-radius: 0.5rem;
    padding: 1.5rem;
    border: 1px solid var(--border-dark);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-dark);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-white);
}

/* ========== STATS GRID ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 0.75rem;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 107, 53, 0.4);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-orange), var(--primary-orange-light));
}

.stat-content {
    flex: 1;
    z-index: 1;
}

.stat-content h3 {
    font-size: 0.85rem;
    color: var(--text-grey-dark);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-trend {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
}

.stat-trend.trend-up {
    color: var(--primary-orange);
}

.stat-trend.trend-down {
    color: var(--primary-orange);
}

.stat-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 2rem;
    flex-shrink: 0;
    position: relative;
}

.stat-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0.1;
}

.stat-icon i {
    z-index: 1;
}

.stat-icon.success {
    color: var(--primary-orange);
}

.stat-icon.success::before {
    background: var(--primary-orange);
}

.stat-icon.danger {
    color: var(--danger);
}

.stat-icon.danger::before {
    background: var(--danger);
}

.stat-icon.warning {
    color: var(--warning);
}

.stat-icon.warning::before {
    background: var(--warning);
}

/* ========== TABLES ========== */
.table-container {
    background-color: var(--bg-card);
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--border-dark);
    margin-bottom: 2rem;
}

.table-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-white);
}

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

thead {
    background-color: var(--bg-input);
}

th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.8rem;
    color: var(--text-grey-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-dark);
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-dark);
    color: var(--text-grey);
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: rgba(255, 107, 53, 0.03);
}

/* ========== BADGES ========== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

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

.badge-danger {
    background-color: rgba(255, 61, 0, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 61, 0, 0.3);
}

.badge-warning {
    background-color: rgba(255, 107, 53, 0.15);
    color: var(--warning);
    border: 1px solid rgba(255, 107, 53, 0.3);
}

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

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

/* ========== BUTTONS ========== */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-orange);
    color: #000000;
    font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-orange-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
    background-color: var(--bg-input);
    color: var(--text-white);
    border: 1px solid var(--border-dark);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--bg-card);
    border-color: var(--border-light);
}

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

.btn-danger:hover:not(:disabled) {
    background-color: #DC2626;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1.05rem;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-grey);
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--bg-input);
    border: 1px solid var(--border-dark);
    border-radius: 0.375rem;
    color: var(--text-white);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-grey-darker);
}

/* ========== TABS ========== */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-dark);
    margin-bottom: 2rem;
    gap: 0.5rem;
}

.tab {
    padding: 0.875rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-grey-dark);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
}

.tab:hover {
    color: var(--text-grey);
}

.tab.active {
    color: var(--primary-orange);
    border-bottom-color: var(--primary-orange);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-dark);
    padding: 2rem;
    border-radius: 0.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-white);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-grey-dark);
    font-size: 1.5rem;
    cursor: pointer;
}

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

/* ========== ALERTS ========== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

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

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

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

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0.5rem 0.875rem;
    background-color: var(--bg-input);
    border: 1px solid var(--border-dark);
    border-radius: 0.375rem;
    color: var(--text-white);
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    background-color: var(--bg-card);
    border-color: var(--primary-orange);
    color: var(--primary-orange);
}

.page-btn.active {
    background-color: var(--primary-orange);
    border-color: var(--primary-orange);
    color: white;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ========== CHARTS ========== */
.chart-card {
    background: linear-gradient(135deg, rgba(30, 30, 35, 0.95) 0%, rgba(20, 20, 25, 0.95) 100%);
    border: 1px solid rgba(249, 115, 22, 0.2);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), 0 0 20px rgba(249, 115, 22, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chart-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f97316 0%, #fb923c 50%, #f97316 100%);
    opacity: 0.8;
}

.chart-card:hover {
    transform: translateY(-2px);
    border-color: rgba(249, 115, 22, 0.4);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4), 0 0 30px rgba(249, 115, 22, 0.2);
}

.chart-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    padding-top: 0.5rem;
    border-bottom: 2px solid rgba(249, 115, 22, 0.3);
}

.chart-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-title i {
    color: #f97316;
    text-shadow: 0 0 10px rgba(249, 115, 22, 0.5);
}

.chart-container {
    position: relative;
    height: 300px;
}

/* ========== LOADING ========== */
.spinner {
    border: 3px solid var(--border-dark);
    border-top: 3px solid var(--primary-orange);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== LOGIN PAGE - Simple Centered ========== */
.login-page-simple {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-main);
    background-image:
        linear-gradient(rgba(255, 107, 53, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 107, 53, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

/* Background Light Effects */
.login-bg-light {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    pointer-events: none;
}

.login-light-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-orange) 0%, transparent 70%);
    top: -250px;
    right: -250px;
    animation: float 8s ease-in-out infinite;
}

.login-light-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-orange) 0%, transparent 70%);
    bottom: -200px;
    left: -200px;
    animation: float 10s ease-in-out infinite reverse;
}

.login-light-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-orange-light) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.2;
    }
}

/* Home Button */
.login-home-btn {
    position: absolute;
    top: 2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: rgba(26, 26, 26, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 53, 0.15);
    border-radius: 0.5rem;
    color: var(--text-grey);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    z-index: 10;
}

.login-home-btn:hover {
    background-color: rgba(26, 26, 26, 0.5);
    border-color: var(--primary-orange);
    color: var(--primary-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.login-home-btn i {
    font-size: 1rem;
}

/* Login Box */
.login-box {
    width: 100%;
    max-width: 480px;
    background-color: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 1rem;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    animation: loginBoxFadeIn 0.6s ease-out;
}

@keyframes loginBoxFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-logo {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo img {
    max-width: 220px;
    height: auto;
}

.login-welcome {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-white);
    margin: 0 0 0.5rem 0;
}

.login-subtitle {
    color: var(--text-grey-dark);
    font-size: 0.95rem;
    margin: 0;
}

.login-form {
    margin-top: 2rem;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label:not(.remember-checkbox) {
    display: block;
    color: var(--text-grey);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.login-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background-color: rgba(30, 30, 30, 0.8);
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    color: var(--text-white);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.login-input:focus {
    outline: none;
    border-color: var(--primary-orange);
    background-color: rgba(30, 30, 30, 1);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    transform: translateY(-2px);
}

.login-input::placeholder {
    color: var(--text-grey-darker);
}

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-grey-dark);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--primary-orange);
}

/* Custom Checkbox */
.remember-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.remember-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

.checkbox-custom {
    display: block;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    border: 2px solid var(--border-light);
    border-radius: 0.25rem;
    background-color: rgba(30, 30, 30, 0.8);
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.remember-checkbox:hover .checkbox-custom {
    border-color: var(--primary-orange);
}

.remember-checkbox input[type="checkbox"]:checked + .checkbox-custom {
    background-color: var(--primary-orange);
    border-color: var(--primary-orange);
}

.remember-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    display: block;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #000000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    color: var(--text-grey);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-orange);
    color: #000000;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
}

.btn-login:hover {
    background-color: var(--primary-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

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

/* OAuth Login Divider */
.login-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    gap: 1rem;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.login-divider span {
    color: var(--text-grey-dark);
    font-size: 0.875rem;
    white-space: nowrap;
}

/* OAuth Buttons */
.oauth-buttons {
    display: flex;
    gap: 1rem;
}

.oauth-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

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

.oauth-icon {
    width: 20px;
    height: 20px;
}

/* Discord Button */
.oauth-discord {
    background: #5865F2;
    color: white;
    border-color: #5865F2;
}

.oauth-discord:hover {
    background: #4752C4;
    border-color: #4752C4;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
    color: white;
}

/* Google Button */
.oauth-google {
    background: var(--bg-input);
    color: var(--text-white);
}

.oauth-google:hover {
    background: var(--bg-card);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    color: var(--text-white);
}

/* Login Footer */
.login-footer {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 1;
}

.login-footer p {
    color: var(--text-grey-dark);
    font-size: 0.875rem;
    margin: 0;
    opacity: 0.6;
}

/* Mobile responsive */
@media (max-width: 576px) {
    .login-box {
        padding: 2rem 1.5rem;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .login-home-btn {
        top: 1rem;
        left: 1rem;
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .login-home-btn span {
        display: none;
    }

    .login-footer {
        bottom: 1rem;
    }

    .login-footer p {
        font-size: 0.75rem;
    }
}

/* Smaller screen height responsive (for screens like 1370x700) */
@media (max-height: 800px) {
    .login-page-simple {
        padding: 1rem;
        min-height: auto;
        height: 100vh;
    }

    .login-box {
        padding: 1.5rem 2rem;
    }

    .login-logo {
        margin-bottom: 1rem;
    }

    .login-logo img {
        max-width: 160px;
    }

    .login-welcome {
        margin-bottom: 1rem;
    }

    .login-title {
        font-size: 1.35rem;
        margin-bottom: 0.25rem;
    }

    .login-subtitle {
        font-size: 0.85rem;
    }

    .login-form {
        margin-top: 1rem;
    }

    .login-form .form-group {
        margin-bottom: 0.875rem;
    }

    .login-form label:not(.remember-checkbox) {
        font-size: 0.8rem;
        margin-bottom: 0.35rem;
    }

    .login-input {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }

    .remember-checkbox {
        font-size: 0.85rem;
    }

    .btn-login {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .login-divider {
        margin: 1rem 0;
    }

    .oauth-buttons {
        gap: 0.75rem;
    }

    .oauth-btn {
        padding: 0.65rem 0.75rem;
        font-size: 0.85rem;
    }

    .login-home-btn {
        top: 0.75rem;
        left: 0.75rem;
        padding: 0.5rem 0.875rem;
        font-size: 0.85rem;
    }

    .login-footer {
        bottom: 0.5rem;
    }
}

/* Extra small screen height */
@media (max-height: 700px) {
    .login-box {
        padding: 1.25rem 1.75rem;
    }

    .login-logo {
        margin-bottom: 0.75rem;
    }

    .login-logo img {
        max-width: 140px;
    }

    .login-welcome {
        margin-bottom: 0.75rem;
    }

    .login-title {
        font-size: 1.2rem;
    }

    .login-form .form-group {
        margin-bottom: 0.75rem;
    }

    .login-input {
        padding: 0.6rem 0.875rem;
    }

    .login-divider {
        margin: 0.75rem 0;
    }

    .oauth-btn {
        padding: 0.5rem 0.65rem;
    }

    .login-home-btn {
        display: none;
    }
}

/* ========== SERVICES GRID ========== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.service-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: 0.5rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-orange);
    border-radius: 0.5rem 0.5rem 0 0;
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-orange);
}

.service-ip {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-orange);
    margin-bottom: 0.75rem;
}

.service-name {
    font-size: 1rem;
    color: var(--text-grey);
    margin-bottom: 1rem;
}

/* ========== EMPTY STATES ========== */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-grey-dark);
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-grey-darker);
    margin-bottom: 1rem;
}

/* ========== UTILITIES ========== */
.text-white { color: var(--text-white) !important; }
.text-grey { color: var(--text-grey) !important; }
.text-orange { color: var(--primary-orange) !important; }
.text-center { text-align: center !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.hidden { display: none !important; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .page-content {
        padding: 1rem;
    }

    .user-info {
        display: none;
    }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-orange);
}

/* ========== WELCOME TOAST ========== */
.welcome-toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(15, 15, 15, 0.95));
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary-orange);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 320px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 107, 53, 0.2);
    z-index: 9999;
    opacity: 0;
    transform: translateX(120%);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.welcome-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.welcome-toast-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-orange-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.welcome-toast-icon i {
    font-size: 1.5rem;
    color: #000;
}

.welcome-toast-content {
    flex: 1;
}

.welcome-toast-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.25rem;
}

.welcome-toast-message {
    font-size: 0.875rem;
    color: var(--text-grey);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .welcome-toast {
        top: 1rem;
        left: 1rem;
        right: 1rem;
        min-width: auto;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* ========== NOTIFICATION MODAL ========== */
.notification-modal {
    position: fixed;
    top: 2rem;
    right: 2rem;
    transform: translateY(-120%);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.notification-modal.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.notification-content {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(15, 15, 15, 0.95));
    backdrop-filter: blur(10px);
    border: 2px solid;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 1rem;
}

.notification-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon i {
    font-size: 1.5rem;
}

.notification-message {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-white);
    flex: 1;
}

/* Success notification */
.notification-success .notification-content {
    border-color: #10b981;
}

.notification-success .notification-icon {
    background-color: rgba(16, 185, 129, 0.1);
}

.notification-success .notification-icon i {
    color: #10b981;
}

.notification-success .notification-message {
    color: var(--text-white);
}

/* Error notification */
.notification-error .notification-content {
    border-color: #ef4444;
}

.notification-error .notification-icon {
    background-color: rgba(239, 68, 68, 0.1);
}

.notification-error .notification-icon i {
    color: #ef4444;
}

.notification-error .notification-message {
    color: var(--text-white);
}

/* Warning notification */
.notification-warning .notification-content {
    border-color: var(--primary-orange);
}

.notification-warning .notification-icon {
    background-color: rgba(255, 107, 53, 0.1);
}

.notification-warning .notification-icon i {
    color: var(--primary-orange);
}

.notification-warning .notification-message {
    color: var(--text-white);
}

/* Info notification */
.notification-info .notification-content {
    border-color: #3b82f6;
}

.notification-info .notification-icon {
    background-color: rgba(59, 130, 246, 0.1);
}

.notification-info .notification-icon i {
    color: #3b82f6;
}

.notification-info .notification-message {
    color: var(--text-white);
}

@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.7);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ========== ENHANCED MOBILE RESPONSIVENESS ========== */

/* Tablets and Small Desktops */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-card {
        padding: 1.5rem;
    }
    
    .table-container {
        overflow-x: auto;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    /* Typography */
    html {
        font-size: 14px;
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    /* Charts */
    .chart-card {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .chart-title {
        font-size: 1.1rem;
    }
    
    /* Tables - Horizontal Scroll */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 600px;
    }
    
    /* Buttons */
    .btn, .btn-primary, .btn-secondary, .btn-danger {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    /* Modals */
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 1rem;
        padding: 1.5rem;
    }
    
    /* Navigation */
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* Header */
    .header {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    /* Further reduce font sizes */
    html {
        font-size: 13px;
    }
    
    /* Compact stats */
    .stat-value {
        font-size: 1.75rem;
    }
    
    /* Stack table actions */
    .table td .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Full width modals */
    .modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
}

/* ========== CHART SKELETON LOADING ========== */
.chart-skeleton {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.skeleton-chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 200px;
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    gap: 1rem;
}

.skeleton-bar {
    flex: 1;
    background: linear-gradient(
        90deg,
        rgba(255, 107, 53, 0.1) 0%,
        rgba(255, 107, 53, 0.2) 50%,
        rgba(255, 107, 53, 0.1) 100%
    );
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
    border-radius: 4px 4px 0 0;
    min-height: 40px;
}

.skeleton-bar:nth-child(1) { height: 60%; }
.skeleton-bar:nth-child(2) { height: 80%; }
.skeleton-bar:nth-child(3) { height: 50%; }
.skeleton-bar:nth-child(4) { height: 90%; }
.skeleton-bar:nth-child(5) { height: 70%; }
.skeleton-bar:nth-child(6) { height: 85%; }
.skeleton-bar:nth-child(7) { height: 65%; }
.skeleton-bar:nth-child(8) { height: 75%; }

@keyframes skeletonPulse {
    0% {
        background-position: 200% 0;
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        background-position: -200% 0;
        opacity: 0.6;
    }
}

.skeleton-loading-text {
    margin-top: 2rem;
    color: #a0a0a0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skeleton-loading-text i {
    color: var(--primary-orange);
}

/* ========== CHART TOUCH GESTURES ========== */
.chart-card canvas {
    touch-action: pan-y pinch-zoom;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Chart container for better mobile interaction */
@media (max-width: 768px) {
    .chart-card canvas {
        max-height: 300px;
    }
    
    /* Enable horizontal scrolling for chart legends on mobile */
    .chart-card {
        position: relative;
    }
    
    /* Better legend layout on mobile */
    canvas + * {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ========== TOUCH-FRIENDLY INTERACTIVE ELEMENTS ========== */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets for mobile */
    .btn, .tab, .nav-link, a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .btn:hover,
    .tab:hover,
    .nav-link:hover {
        transform: none;
    }
    
    /* Add active states for touch feedback */
    .btn:active {
        transform: scale(0.95);
    }
    
    .tab:active {
        background: var(--bg-input);
    }
}
