/* --- Theme variables --- */
:root {
    --bg-dark: #07050d;
    --bg-surface: rgba(20, 16, 32, 0.6);
    --bg-surface-solid: #141020;
    --bg-card: rgba(28, 22, 46, 0.5);
    
    --primary: #7c3aed;
    --primary-glow: rgba(124, 58, 237, 0.35);
    --primary-gradient: linear-gradient(135deg, #7c3aed, #4f46e5);
    
    --secondary: #06b6d4;
    --secondary-gradient: linear-gradient(135deg, #06b6d4, #0891b2);
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.2);
    --danger: #f43f5e;
    --warning: #f59e0b;
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-disabled: #4b5563;
    
    --border-color: rgba(255, 255, 255, 0.06);
    --border-active: rgba(124, 58, 237, 0.5);
    
    --font-outfit: 'Outfit', sans-serif;
    --font-number: 'Orbitron', sans-serif;
    
    --transition-speed: 0.3s;
}

/* --- Base resets & animations --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-outfit);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* --- Ambient Glowing Blobs --- */
.blob-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.28;
    pointer-events: none;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    will-change: transform;
}
.blob-1 {
    width: 450px;
    height: 450px;
    background: #7c3aed;
    top: -150px;
    left: -100px;
    animation: floatBlob 20s infinite alternate ease-in-out;
}
.blob-2 {
    width: 500px;
    height: 500px;
    background: #4f46e5;
    bottom: -200px;
    right: -100px;
    animation: floatBlob 25s infinite alternate-reverse ease-in-out;
}
.blob-3 {
    width: 350px;
    height: 350px;
    background: #06b6d4;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 40px) scale(1.15); }
}

/* --- Typography Helpers --- */
h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: color var(--transition-speed);
}
a:hover {
    color: var(--primary);
}

/* --- Toast Notification System --- */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-column-gap: 12px;
    flex-direction: column;
    max-width: 380px;
    width: 100%;
}

.toast {
    background: rgba(28, 22, 46, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    animation: slideInRight var(--transition-speed) cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

.toast-icon {
    flex-shrink: 0;
}
.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }

.toast-content {
    flex-grow: 1;
    font-size: 0.9rem;
    font-weight: 500;
}

@keyframes slideInRight {
    from { transform: translateX(110%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.toast.fade-out {
    animation: fadeOut var(--transition-speed) forwards;
}
@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-10px); }
}

/* --- Common UI Components --- */
.glass-card {
    background: rgba(20, 16, 32, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.btn {
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
}
.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--secondary-gradient);
    color: #fff;
}
.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
}
.btn-outline:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-main);
}

.btn-block {
    width: 100%;
}

.btn-large {
    padding: 14px 28px;
    font-size: 1.05rem;
}

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

/* Input Styles */
.input-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-outfit);
    font-size: 0.95rem;
    transition: all var(--transition-speed);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.2);
    background: rgba(0, 0, 0, 0.4);
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.btn-toggle-password {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 4px;
    transition: color var(--transition-speed);
}

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

.input-wrapper input[type="password"],
.input-wrapper input[type="text"] {
    padding-right: 42px;
}

.input-help {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* --- VIEW 1: AUTHENTICATION CARD --- */
#view-auth {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 100vh;
}
#view-auth.active {
    display: flex;
}

.auth-card {
    background: rgba(20, 16, 32, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 440px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 14px;
    margin-bottom: 16px;
}

.logo-icon {
    color: var(--primary);
    width: 32px;
    height: 32px;
}

.auth-header h1 {
    font-size: 2.2rem;
    margin-bottom: 4px;
}

.auth-header h1 span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn var(--transition-speed) ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- VIEW 2: DASHBOARD LAYOUT --- */
#view-dashboard {
    display: none;
    min-height: 100vh;
}
#view-dashboard.active {
    display: block;
}

.view-container {
    display: none;
}

/* --- Sidebar (Universal Bottom Navigation) --- */
.sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: rgba(14, 11, 26, 0.98);
    border-top: 1px solid var(--border-color);
    border-right: none;
    border-bottom: none;
    padding: 0 20px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.sidebar-brand {
    display: none !important;
}

.sidebar-menu {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 600px;
    justify-content: space-around;
    gap: 12px;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 16px;
    color: var(--text-muted);
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.75rem;
    transition: all var(--transition-speed);
    text-decoration: none;
    cursor: pointer;
}

.menu-item svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-speed);
}

.menu-item:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.02);
}

.menu-item:hover svg {
    transform: translateY(-2px);
}

.menu-item.active {
    color: var(--primary);
    background: transparent;
    box-shadow: none;
    text-shadow: 0 0 8px var(--primary-glow);
}

.sidebar-user {
    display: none !important;
}

/* --- Main Content --- */
.main-content {
    padding: 30px 30px 95px 30px;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

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

.header-title h2 {
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.header-title p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Balance Card Widget in Header */
.balance-card {
    background: rgba(28, 22, 46, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.balance-value {
    font-family: var(--font-number);
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
}

.balance-btn-add {
    background: var(--primary);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed);
}
.balance-btn-add:hover {
    background: #6d28d9;
    transform: scale(1.08);
}
.balance-btn-add svg {
    width: 16px;
    height: 16px;
}

/* Tab Management */
.tab-pane {
    display: none;
}
.tab-pane.active {
    display: block;
    animation: fadeIn var(--transition-speed) ease;
}

/* --- TAB 1: ORDER NOMOR LAYOUT --- */
.order-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 28px;
    align-items: start;
}

.order-setup {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.order-setup h3, .active-orders h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Steps selection CSS */
.selection-step {
    border-left: 2px solid var(--border-color);
    padding-left: 20px;
    margin-left: 10px;
    position: relative;
    transition: opacity var(--transition-speed);
}

.selection-step.disabled {
    opacity: 0.28;
    pointer-events: none;
}

.step-num {
    position: absolute;
    left: -13px;
    top: 0;
    width: 24px;
    height: 24px;
    background: var(--bg-surface-solid);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all var(--transition-speed);
}

.selection-step:not(.disabled) .step-num {
    border-color: var(--primary);
    color: #fff;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.step-body h4 {
    font-size: 0.98rem;
    margin-bottom: 12px;
    color: var(--text-main);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 38px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    font-size: 0.88rem;
}
.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-box svg {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

/* Services Grid selector */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
}

.service-card {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition-speed);
}

.service-card img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

.service-card span {
    font-size: 0.78rem;
    font-weight: 500;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-card:hover {
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.03);
}

.service-card.selected {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.12);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Country Selector list */
.countries-list {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 4px;
}

.country-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.country-row:hover {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.15);
}

.country-row.selected {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.12);
}

.country-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.country-info img {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
}

.country-name {
    font-size: 0.88rem;
    font-weight: 600;
}

.country-prefix {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.country-price-stock {
    text-align: right;
}

.country-price {
    font-family: var(--font-number);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--secondary);
}

.country-stock {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Operators selectors */
.operators-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.operator-chip {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: capitalize;
    transition: all var(--transition-speed);
}

.operator-chip img {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.operator-chip:hover {
    border-color: rgba(255,255,255,0.15);
}

.operator-chip.selected {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.12);
}

.placeholder-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    padding: 10px 0;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px;
    grid-column: 1 / -1;
    color: var(--text-muted);
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* --- Active Orders Section --- */
.active-orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 14px;
}

.order-active-card {
    background: rgba(28, 22, 46, 0.8);
    border: 1px solid var(--border-active);
    border-radius: 12px;
    padding: 18px;
    position: relative;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.12);
}

.active-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.active-service-tag {
    background: rgba(124, 58, 237, 0.15);
    color: #c084fc;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.active-timer {
    font-size: 0.8rem;
    color: var(--warning);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.active-phone {
    font-family: var(--font-number);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
    letter-spacing: 0.5px;
    user-select: all;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-copy {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-speed);
}
.btn-copy:hover {
    color: var(--secondary);
}

/* OTP Display Box */
.otp-display-box {
    background: rgba(0,0,0,0.3);
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    margin-bottom: 14px;
}

.otp-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.otp-loading .pulsing-dot {
    width: 8px;
    height: 8px;
    background: var(--warning);
    border-radius: 50%;
    animation: pulseGlow 1.2s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 8px var(--warning); }
    100% { transform: scale(0.8); opacity: 0.5; }
}

.otp-code-value {
    font-family: var(--font-number);
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--success);
    letter-spacing: 2px;
}

.otp-message-full {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.active-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-danger-light {
    background: rgba(244, 63, 94, 0.1);
    border-color: rgba(244, 63, 94, 0.2);
    color: var(--danger);
}
.btn-danger-light:hover {
    background: var(--danger);
    color: #fff;
}

.btn-success-light {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}
.btn-success-light:hover {
    background: var(--success);
    color: #fff;
}

.pulse-icon {
    animation: heartbeat 2s infinite ease-in-out;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.15); }
    28% { transform: scale(1); }
    42% { transform: scale(1.15); }
    70% { transform: scale(1); }
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-disabled);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.empty-state svg {
    width: 48px;
    height: 48px;
}

/* --- TAB 2 & 3: TABLES --- */
.card-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

th {
    padding: 14px 16px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: var(--text-main);
}

tr:hover td {
    background: rgba(255,255,255,0.01);
}

.badge-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-status.completed, .badge-status.success {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-status.canceled, .badge-status.cancel {
    background: rgba(244, 63, 94, 0.12);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.badge-status.pending, .badge-status.received {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-status.expiring {
    background: rgba(124, 58, 237, 0.12);
    color: #a78bfa;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.text-center { text-align: center; }

/* --- TAB 3: DEPOSIT LAYOUT --- */
.deposit-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
}

.nominal-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chip {
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all var(--transition-speed);
}
.chip:hover {
    border-color: rgba(255,255,255,0.2);
}
.chip.active {
    background: rgba(124, 58, 237, 0.12);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 8px var(--primary-glow);
}

/* Invoice Box CSS */
.deposit-invoice-card {
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

.invoice-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--text-disabled);
    flex-grow: 1;
    text-align: center;
}
.invoice-empty svg {
    width: 64px;
    height: 64px;
}

.invoice-amount-box {
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.invoice-amount-box .lbl {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.invoice-amount-box .val {
    font-family: var(--font-number);
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
}

.invoice-amount-box .sub-lbl {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.qris-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.qris-box img {
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    width: 200px;
    height: 200px;
    object-fit: contain;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.qris-timer {
    font-size: 0.88rem;
    color: var(--warning);
    font-weight: 600;
}

.instructions {
    background: rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 14px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.instructions ol {
    padding-left: 16px;
}

.instructions li {
    margin-bottom: 6px;
}

.invoice-actions {
    display: flex;
    justify-content: center;
}

/* --- TAB 4: ADMIN PANEL LAYOUT --- */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-icon.profit { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.stat-icon.orders { background: rgba(6, 182, 212, 0.12); color: var(--secondary); }
.stat-icon.users { background: rgba(245, 158, 11, 0.12); color: var(--warning); }
.stat-icon.api-bal { background: rgba(124, 58, 237, 0.12); color: var(--primary); }

.stat-body {
    display: flex;
    flex-direction: column;
}

.stat-body .label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-body .value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-top: 2px;
}

.admin-layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 24px;
    align-items: start;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 14px;
}

.input-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.btn-actions-flex {
    display: flex;
    gap: 6px;
}

/* --- MODAL SYSTEM --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed);
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #181428;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    padding: 24px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform var(--transition-speed) cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.active .modal-content {
    transform: scale(1);
}

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

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
}
.modal-close:hover {
    color: #fff;
}

/* Helper margin */
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 20px; }
.mb-3 { margin-bottom: 12px; }

/* --- PROFILE TAB STYLES --- */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 28px;
    align-items: start;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.15);
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin: 0 auto 20px auto;
}

.profile-avatar-large svg {
    width: 40px;
    height: 40px;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.profile-detail-item .label {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.profile-detail-item .value {
    font-weight: 600;
    font-size: 0.95rem;
}

.profile-actions-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-logout-container {
    max-width: 320px;
    margin: 40px auto 20px auto;
}

@media (max-width: 900px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
}

/* --- Server Selection --- */
.servers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.server-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.server-card:hover {
    background: rgba(124, 58, 237, 0.08);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.server-card.selected {
    background: rgba(124, 58, 237, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

.server-card .server-name {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.server-card .server-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--secondary);
}

.server-card .server-stock {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Responsive styles */
.btn-logout-mobile {
    display: none;
}

@media (max-width: 1024px) {
    .main-content {
        padding: 20px 20px 85px 20px;
        height: auto;
    }
    
    .order-layout, .deposit-layout, .admin-layout {
        grid-template-columns: 1fr;
    }
    
    .header-widgets {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
    }
    
    .balance-card {
        flex-grow: 1;
        justify-content: space-between;
    }
}

@media (max-width: 600px) {
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .header-widgets {
        width: 100%;
    }

    .sidebar {
        padding: 0 8px;
    }
    
    .sidebar-menu {
        gap: 4px;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        width: 100%;
    }
    
    .sidebar-menu::-webkit-scrollbar {
        display: none;
    }
    
    .menu-item {
        padding: 6px 10px;
        min-width: 70px;
        flex-shrink: 0;
    }
}

/* --- Modal & Details --- */
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.detail-row .label {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.detail-row .value {
    font-weight: 600;
    font-size: 0.95rem;
}

.otp-box-detail h2:hover {
    color: var(--primary) !important;
}

.clickable-row:hover {
    background: rgba(255, 255, 255, 0.02) !important;
}

@media (max-width: 600px) {
    .landing-grid {
        grid-template-columns: 1fr !important;
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(167, 139, 250, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(167, 139, 250, 0);
    }
}
