:root {
    --bg-dark: #0a0a0f;
    --bg-darker: #050508;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.1);
    --primary-color: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.3);
    --secondary-color: #818cf8;
    --accent-color: #a78bfa;
    --success-color: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --danger-color: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.3);
    --warning-color: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.3);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    background-image: 
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(167, 139, 250, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
}

/* Liquid Glass Effect */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.glass-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: var(--glass-highlight);
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Login Page */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-card, .register-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-align: center;
}

.login-card h2, .register-card h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.login-card p, .register-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 0.7rem;
    text-align: left;
}

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

input, textarea, select {
    width: 100%;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: rgba(255, 255, 255, 0.08);
}

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

button {
    cursor: pointer;
    border: none;
    border-radius: 12px;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    width: 100%;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px var(--success-glow);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px var(--danger-glow);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 15px var(--warning-glow);
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 6px;
    width: auto;
    box-shadow: none;
}

.error-msg {
    color: var(--danger-color);
    margin-top: 1rem;
    font-size: 0.9rem;
}

.success-msg {
    color: var(--success-color);
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Settings Page */
.settings-card {
    max-width: 600px;
}

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

.settings-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.settings-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.danger-zone {
    background: rgba(239, 68, 68, 0.05);
}

@media (max-width: 600px) {
    .settings-info-grid {
        grid-template-columns: 1fr;
    }
}

.register-link {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.register-link a, .register-link span {
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: none;
}

.register-link a:hover, .register-link span:hover {
    text-decoration: underline;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(167, 139, 250, 0.05) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user span {
    color: var(--text-secondary);
}

/* Push Toggle Button */
.push-toggle {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 8px;
    transition: all 0.2s;
    opacity: 0.6;
    margin-right: 0.3rem;
}

.push-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.push-toggle.subscribed {
    opacity: 1;
    color: var(--success-color);
}

/* Notification Bell */
.notification-bell {
    position: relative;
    cursor: pointer;
}

.bell-icon {
    font-size: 1.3rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.bell-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger-color);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.notification-dropdown {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 320px;
    max-height: 400px;
    background: rgba(20, 20, 35, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 99999;
    overflow: hidden;
}

.notification-dropdown.show {
    display: block;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
    font-weight: 600;
    color: var(--text-primary);
}

.notification-header .mark-read {
    font-size: 0.75rem;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 500;
}

.notification-header .mark-read:hover {
    text-decoration: underline;
}

.notification-list {
    max-height: 320px;
    overflow-y: auto;
}

.notification-item {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
    background: rgba(99, 102, 241, 0.1);
    border-left: 3px solid var(--primary-color);
}

.notification-item .notif-icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.notification-item .notif-title {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.notification-item .notif-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.notification-item .notif-time {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.notification-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.credit-display {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    color: var(--success-color);
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 70px);
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: 1.5rem 0;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    padding: 0.9rem 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    margin: 0.25rem 0;
}

.sidebar li:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
    border-left-color: var(--primary-color);
}

.sidebar li.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.2) 0%, transparent 100%);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

/* Admin Menu */
.admin-menu {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.admin-menu h4 {
    padding: 0 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--danger-color);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-menu li:hover {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: var(--danger-color);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.section h2 {
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* VPS Grid */
.vps-grid, .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.vps-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(167, 139, 250, 0.05) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 1.75rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.vps-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vps-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-6px);
    box-shadow: 0 25px 50px rgba(99, 102, 241, 0.2);
}

.vps-card:hover::before {
    opacity: 1;
}

.vps-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.vps-card-header h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.vps-card-header .vps-id {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.vps-card-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 1.25rem;
}

.vps-spec-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.vps-spec-item .spec-icon {
    font-size: 1rem;
}

.vps-spec-item .spec-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vps-spec-item .spec-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.vps-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.vps-card-buttons {
    display: flex;
    gap: 0.5rem;
}

.vps-cost {
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--success-color), #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.vps-expiry {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
}

.vps-expiry .expiry-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vps-expiry .expiry-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.vps-expiry .expiry-remaining {
    font-size: 0.7rem;
    color: var(--warning-color);
}

/* VPS Stats Display */
.vps-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-running {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.status-running::before {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulse-glow 2s ease-in-out infinite;
}

.status-stopped {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.status-stopped::before {
    background: #ef4444;
}

.status-loading {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.status-loading::before {
    background: #fbbf24;
    animation: pulse-glow 1s ease-in-out infinite;
}

.status-unknown {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}

.status-unknown::before {
    background: #9ca3af;
}

.status-offline {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.status-offline::before {
    background: #6b7280;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.vps-card-stats {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Memory Bar - Full Width */
.memory-stat-container {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(167, 139, 250, 0.04) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}

.memory-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.memory-stat-header .memory-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.memory-stat-header .memory-label .mem-icon {
    font-size: 1.1rem;
}

.memory-stat-header .memory-percent {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.memory-bar-container {
    position: relative;
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.memory-bar-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.memory-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.memory-bar-gradient-green {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.memory-bar-gradient-yellow {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.memory-bar-gradient-red {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.memory-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.memory-values .mem-used {
    color: var(--text-secondary);
}

.memory-values .mem-max {
    color: var(--text-muted);
}

/* Stats Grid - CPU and Uptime */
.vps-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.vps-stat-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.vps-stat-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
}

.stat-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-icon-wrapper.cpu-icon {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.1) 100%);
    color: #818cf8;
}

.stat-icon-wrapper.uptime-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    color: #34d399;
}

.vps-stat-item .stat-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.vps-stat-item .stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vps-stat-item .stat-value {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.vps-stat-item .stat-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Old stat bar styles kept for compatibility */
.stat-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease, background-color 0.3s ease;
}

.vps-stat-item.stat-simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vps-stat-item.stat-simple .stat-info {
    margin-bottom: 0;
    flex: 1;
}

/* Product Cards */
.product-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.product-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.product-card h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.product-specs {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.product-specs span {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.product-price {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--success-color), #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 1rem 0;
}

.product-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 1rem 0;
}

/* Orders */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 16px;
    border-left: 4px solid var(--text-muted);
}

.order-card.order-pending {
    border-left-color: var(--warning-color);
}

.order-card.order-completed {
    border-left-color: var(--success-color);
}

.order-card.order-cancelled {
    border-left-color: var(--danger-color);
    opacity: 0.6;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.order-id {
    font-weight: 600;
    color: var(--text-muted);
}

.order-status, .status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
}

.status-completed, .status-approved {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
}

.status-cancelled, .status-rejected {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
}

.order-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.order-specs {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
    flex-wrap: wrap;
}

.order-specs span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.order-price {
    color: var(--primary-color);
    font-weight: 600;
}

.order-date {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* PSC Section */
.psc-form-card {
    max-width: 500px;
    margin-bottom: 2rem;
}

.psc-info {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Admin Tables */
.admin-table-container {
    margin-top: 1rem;
    overflow-x: auto;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid var(--glass-border);
}

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

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

.admin-table th {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

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

.admin-table select {
    padding: 0.5rem;
    font-size: 0.85rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.95) 0%, rgba(15, 15, 25, 0.98) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    margin: 1% auto;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-content.modal-large {
    max-width: 900px;
}

.modal-content h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.modal-tab {
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.modal-tab.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--primary-color);
}

.modal-tab-content {
    display: none;
}

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

/* Terminal Container */
.terminal-container {
    background: #0d0d0d;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.9) 0%, rgba(20, 20, 30, 0.95) 100%);
    border-bottom: 1px solid var(--glass-border);
}

.terminal-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.term-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.term-status-dot.disconnected {
    background: var(--text-muted);
}

.term-status-dot.connecting {
    background: var(--warning-color);
    animation: pulse-glow 1s ease-in-out infinite;
}

.term-status-dot.connected {
    background: var(--success-color);
    box-shadow: 0 0 8px var(--success-color);
}

.terminal-actions {
    display: flex;
    gap: 0.5rem;
}

.terminal-box {
    height: 400px;
    padding: 0.5rem;
    background: #000;
}

.terminal-box .xterm {
    height: 100%;
}

.terminal-footer {
    padding: 0.5rem 1rem;
    background: rgba(20, 20, 30, 0.8);
    border-top: 1px solid var(--glass-border);
}

.terminal-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* VPS Info Grid */
.vps-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.info-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.info-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.info-value {
    display: block;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.close {
    color: var(--text-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

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

/* Control Panel */
.control-panel {
    margin-top: 1rem;
}

.status-indicator {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 1rem;
    border-radius: 12px;
    color: var(--success-color);
    font-weight: 500;
}

.control-buttons {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

.console-output {
    background: var(--bg-darker);
    border: 1px solid var(--glass-border);
    color: var(--success-color);
    padding: 1rem;
    border-radius: 12px;
    font-family: 'Fira Code', 'Monaco', monospace;
    font-size: 0.85rem;
    height: 150px;
    overflow-y: auto;
}

/* Role Badge */
.role-badge {
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

.role-admin {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
}

.role-user {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
}

/* Form Row */
.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

/* Checkbox */
input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

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

.section {
    animation: fadeIn 0.3s ease;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
    }
    
    .sidebar ul {
        display: flex;
        overflow-x: auto;
        padding: 0 1rem;
    }
    
    .sidebar li {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .admin-menu {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
    
    .admin-menu h4 {
        display: none;
    }
    
    .admin-menu ul {
        display: flex;
    }
    
    .vps-grid, .products-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
    }
}

/* =============================================
   TICKET SYSTEM STYLES
============================================= */

.ticket-card {
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ticket-card:hover {
    transform: translateX(5px);
    border-color: var(--primary-color);
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-new {
    background: var(--primary-color);
    color: white;
    margin-left: 0.5rem;
}

/* Status badges for tickets */
.status-badge.status-open {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.status-badge.status-in_progress {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.status-badge.status-closed {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
}

/* Priority badges */
.priority-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.priority-badge.priority-low {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
}

.priority-badge.priority-normal {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.priority-badge.priority-high {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.priority-badge.priority-urgent {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Ticket messages */
.ticket-messages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.ticket-message {
    padding: 1rem;
    border-radius: 12px;
    max-width: 85%;
}

.ticket-message.user-message {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    align-self: flex-start;
}

.ticket-message.admin-message {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    align-self: flex-end;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.message-author {
    font-weight: 600;
    color: var(--text-primary);
}

.message-time {
    color: var(--text-muted);
}

.message-body {
    color: var(--text-secondary);
    line-height: 1.5;
    word-wrap: break-word;
}

/* Admin filters */
.admin-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-filters select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
}

.admin-filters select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Reply section */
#ticketReplySection textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-primary);
    resize: vertical;
    min-height: 80px;
}

#ticketReplySection textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

#ticketReplySection textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

