/* ============================================================
   RETRO OS SUITE: WINDOWS 7, WINDOWS XP, & WINDOWS 95 THEMES
   Manajemen Akun & Langganan (CPanel Zero-Config Ready)
   ============================================================ */

:root {
    --font-stack: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    --win-bg: #008080;
    --taskbar-h: 38px;
}

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

body {
    font-family: var(--font-stack);
    font-size: 13px;
    height: 100vh;
    overflow: hidden;
    user-select: none;
    transition: background 0.3s ease;
}

/* ============================================================
   THEME 1: WINDOWS 95 (CLASSIC BEVEL & TEAL)
   ============================================================ */
body.theme-win95 {
    --font-stack: "MS Sans Serif", "Microsoft Sans Serif", Tahoma, sans-serif;
    --desktop-bg: #008080;
    --window-bg: #c0c0c0;
    --window-border: #dfdfdf;
    --window-shadow: #000000;
    --titlebar-active: linear-gradient(90deg, #000080, #1084d0);
    --titlebar-text: #ffffff;
    --btn-bg: #c0c0c0;
    --btn-border-light: #ffffff;
    --btn-border-dark: #808080;
    --btn-border-darkest: #000000;
    background-color: var(--desktop-bg);
    background-image: radial-gradient(rgba(0, 0, 0, 0.15) 15%, transparent 16%);
    background-size: 4px 4px;
}

body.theme-win95 .os-window {
    background: var(--window-bg);
    border: 2px solid;
    border-color: #dfdfdf #000000 #000000 #dfdfdf;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.4);
}

body.theme-win95 .window-inner {
    border: 1px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 2px;
}

body.theme-win95 .title-bar {
    background: var(--titlebar-active);
    color: var(--titlebar-text);
    padding: 3px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    font-size: 12px;
}

body.theme-win95 .win-btn {
    background: #c0c0c0;
    border: 1px solid;
    border-color: #ffffff #000000 #000000 #ffffff;
    box-shadow: inset 1px 1px 0px #dfdfdf, inset -1px -1px 0px #808080;
    color: #000000;
    font-family: var(--font-stack);
    font-weight: bold;
    font-size: 11px;
    cursor: pointer;
    min-width: 18px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

body.theme-win95 .win-btn:active {
    border-color: #000000 #ffffff #ffffff #000000;
    box-shadow: inset 1px 1px 0px #808080;
    padding-top: 1px;
    padding-left: 1px;
}

body.theme-win95 .sunken-panel {
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    background: #ffffff;
}

body.theme-win95 .taskbar {
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    box-shadow: inset 0 1px 0 #dfdfdf;
    height: 32px;
}

body.theme-win95 .start-btn {
    border: 2px solid;
    border-color: #ffffff #000000 #000000 #ffffff;
    box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
    background: #c0c0c0;
    font-weight: bold;
    height: 24px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

body.theme-win95 .start-btn:active, body.theme-win95 .start-btn.active {
    border-color: #000000 #ffffff #ffffff #000000;
    box-shadow: inset 1px 1px 0 #808080;
}

body.theme-win95 .systray {
    border: 1px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    padding: 2px 8px;
    font-size: 11px;
}

/* ============================================================
   THEME 2: WINDOWS XP (LUNA BLUE & BLISS)
   ============================================================ */
body.theme-winxp {
    --font-stack: "Tahoma", "Segoe UI", sans-serif;
    /* Bliss Wallpaper Recreation via Pure CSS */
    background: linear-gradient(to bottom, #1075d4 0%, #3e94ec 35%, #76bbf8 50%, #4da722 51%, #358012 75%, #2a6310 100%);
    background-size: cover;
    background-attachment: fixed;
}

body.theme-winxp .os-window {
    background: #ece9d8;
    border: 3px solid #0055ea;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

body.theme-winxp .title-bar {
    background: linear-gradient(to bottom, #0058ee 0%, #3593ff 12%, #288eff 30%, #0055ea 70%, #0045d0 100%);
    color: #ffffff;
    padding: 5px 8px;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    font-size: 12px;
    text-shadow: 1px 1px 2px #002277;
    border-bottom: 1px solid #002277;
}

body.theme-winxp .win-btn {
    background: linear-gradient(to bottom, #fcfdfe, #e3e7eb 45%, #c5cbd1 50%, #e6eaf0);
    border: 1px solid #003c74;
    border-radius: 3px;
    color: #002255;
    font-weight: bold;
    cursor: pointer;
    min-width: 22px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 #ffffff;
}

body.theme-winxp .win-btn.close-btn {
    background: linear-gradient(to bottom, #ff9b84 0%, #e84b30 45%, #c92900 50%, #e14324 100%);
    border-color: #8c1000;
    color: #ffffff;
    text-shadow: 1px 1px 1px #550000;
}

body.theme-winxp .win-btn.close-btn:hover {
    background: linear-gradient(to bottom, #ffb3a1 0%, #f45e43 45%, #df3306 50%, #f15c3d 100%);
}

body.theme-winxp .sunken-panel {
    background: #ffffff;
    border: 1px solid #7f9db9;
    border-radius: 2px;
}

body.theme-winxp .taskbar {
    background: linear-gradient(to bottom, #245edb 0%, #3f8cf3 9%, #245edb 18%, #245edb 92%, #1941a5 100%);
    height: 34px;
    box-shadow: inset 0 1px 1px #7faef9;
    border-top: 1px solid #16388f;
}

body.theme-winxp .start-btn {
    background: linear-gradient(to bottom, #388e3c 0%, #43a047 15%, #2e7d32 45%, #1b5e20 80%, #2e7d32 100%);
    border: 1px solid #144917;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    color: #ffffff;
    font-style: italic;
    font-weight: 900;
    font-size: 15px;
    padding: 0 16px 0 10px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 1px 1px 2px #093309;
    box-shadow: inset 0 1px 2px #7cd97f, 2px 0 5px rgba(0,0,0,0.3);
    cursor: pointer;
}

body.theme-winxp .start-btn:hover {
    background: linear-gradient(to bottom, #4caf50 0%, #5cb860 15%, #388e3c 45%, #236c28 80%, #388e3c 100%);
}

body.theme-winxp .systray {
    background: linear-gradient(to bottom, #0f74dc 0%, #1589ee 50%, #0d63bd 100%);
    border-left: 1px solid #084992;
    box-shadow: inset 1px 0 2px #38a5ff;
    color: #ffffff;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

/* ============================================================
   THEME 3: WINDOWS 7 (AERO GLASS & ELEGANT GLOW)
   ============================================================ */
body.theme-win7 {
    --font-stack: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    /* Windows 7 Aurora Wallpaper */
    background: radial-gradient(circle at 50% 20%, #4a8cd1 0%, #205c9a 40%, #0b3260 80%, #041427 100%);
    background-size: cover;
    background-attachment: fixed;
}

body.theme-win7 .os-window {
    background: rgba(245, 247, 250, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(100, 180, 255, 0.35);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

body.theme-win7 .title-bar {
    background: linear-gradient(to bottom, rgba(230, 245, 255, 0.8) 0%, rgba(180, 215, 245, 0.6) 50%, rgba(140, 185, 230, 0.5) 51%, rgba(160, 205, 245, 0.7) 100%);
    color: #1a2a3a;
    padding: 7px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
}

body.theme-win7 .win-btn {
    background: linear-gradient(to bottom, rgba(255,255,255,0.7) 0%, rgba(220,230,240,0.5) 100%);
    border: 1px solid rgba(120, 150, 180, 0.6);
    border-radius: 4px;
    color: #2c3e50;
    cursor: pointer;
    min-width: 26px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.8);
    transition: all 0.2s ease;
}

body.theme-win7 .win-btn:hover {
    background: linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(180,215,255,0.8));
    border-color: #3b88fd;
    box-shadow: 0 0 6px #70b4ff;
}

body.theme-win7 .win-btn.close-btn:hover {
    background: linear-gradient(to bottom, #ff7a70, #e03224);
    border-color: #b01000;
    color: #ffffff;
    box-shadow: 0 0 8px rgba(255, 50, 50, 0.7);
}

body.theme-win7 .sunken-panel {
    background: #ffffff;
    border: 1px solid #b8c9d9;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}

body.theme-win7 .taskbar {
    background: linear-gradient(to bottom, rgba(40, 75, 110, 0.75) 0%, rgba(20, 45, 75, 0.85) 100%);
    backdrop-filter: blur(15px);
    height: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
}

body.theme-win7 .start-btn {
    width: 44px;
    height: 44px;
    margin-top: -6px;
    margin-left: 6px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 30%, #50a8ff 0%, #1a5ea6 60%, #0d386b 100%);
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 2px 6px rgba(0,0,0,0.5), 0 0 8px rgba(70, 160, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

body.theme-win7 .start-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 2px 10px rgba(0,0,0,0.6), 0 0 14px rgba(120, 200, 255, 0.9);
}

body.theme-win7 .systray {
    color: #ffffff;
    padding: 0 14px;
    font-size: 11px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================================
   DESKTOP & WINDOW LAYOUT
   ============================================================ */
#desktop {
    position: relative;
    width: 100vw;
    height: calc(100vh - var(--taskbar-h));
    padding: 12px;
    overflow: hidden;
}

.os-window {
    position: absolute;
    top: 20px;
    left: 30px;
    right: 30px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.window-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Toolbars & Nav */
.retro-menu-bar {
    display: flex;
    gap: 14px;
    padding: 4px 8px;
    border-bottom: 1px solid rgba(0,0,0,0.15);
    font-size: 12px;
}

.retro-menu-item {
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 2px;
}

.retro-menu-item:hover {
    background: rgba(0,0,0,0.1);
}

.theme-selector-box {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: bold;
}

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.stat-card {
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-icon {
    font-size: 26px;
}

.stat-info .stat-value {
    font-size: 18px;
    font-weight: bold;
}

.stat-info .stat-label {
    font-size: 11px;
    color: #555;
}

/* Tabs */
.tab-container {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #808080;
    padding-left: 8px;
}

.tab-btn {
    padding: 6px 14px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    background: #d4d0c8;
    border: 1px solid #808080;
    border-bottom: none;
    margin-bottom: -2px;
}

.tab-btn.active {
    background: #ffffff;
    border-bottom: 2px solid #ffffff;
    color: #000080;
}

/* Filter Toolbar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-input, .retro-select, .retro-input {
    padding: 5px 8px;
    font-family: inherit;
    font-size: 12px;
}

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

.retro-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

.retro-table th {
    background: #e0e0e0;
    padding: 6px 8px;
    border: 1px solid #b0b0b0;
    font-weight: bold;
}

.retro-table td {
    padding: 6px 8px;
    border: 1px solid #d0d0d0;
}

.retro-table tr:hover {
    background-color: #f0f7ff;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

.badge-active { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.badge-expiring { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.badge-expired { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Buttons */
.btn-action {
    padding: 3px 8px;
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.btn-wa {
    background: #25d366;
    color: white;
    border: 1px solid #1ebc5a;
    border-radius: 3px;
    font-weight: bold;
}
.btn-wa:hover { background: #1ebc5a; }

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-overlay.open {
    display: flex;
}

.modal-window {
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.form-row {
    margin-bottom: 10px;
}

.form-row label {
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
    font-size: 11px;
}

.form-row input, .form-row select, .form-row textarea {
    width: 100%;
    box-sizing: border-box;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid #ccc;
}

/* Taskbar bottom */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 99;
}

.taskbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
}

.taskbar-apps {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-left: 6px;
}

.task-item {
    padding: 3px 10px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* Start Menu Popup */
.start-menu-popup {
    position: fixed;
    bottom: var(--taskbar-h);
    left: 0;
    width: 260px;
    background: #ffffff;
    border: 2px solid #0055ea;
    box-shadow: 2px -2px 10px rgba(0,0,0,0.3);
    display: none;
    flex-direction: column;
    z-index: 101;
}

.start-menu-popup.open {
    display: flex;
}

.start-header {
    background: linear-gradient(to right, #0055ea, #3593ff);
    color: white;
    padding: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.start-menu-list {
    list-style: none;
    padding: 6px 0;
}

.start-menu-item {
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 12px;
}

.start-menu-item:hover {
    background: #245edb;
    color: white;
}

.start-footer {
    background: #ece9d8;
    padding: 6px 10px;
    border-top: 1px solid #ccc;
    display: flex;
    justify-content: flex-end;
}

/* Status Bar */
.status-bar {
    padding: 4px 8px;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    background: rgba(0,0,0,0.03);
    border-top: 1px solid rgba(0,0,0,0.1);
}

/* Login Modal */
#loginModal .modal-window {
    max-width: 360px;
}
