/* ==========================================================================
   VOYAGER APPLICATION SERVER - THEME GRAY DARK (SWEETALERT2 STYLING)
   Palette Reference: test.html
   Body: #1e1e1e | Card/Header/Modal: #2b2b2b | Text: #e0e0e0 | Title: #f0f0f0
   Buttons: Primary #4a90e2 | Secondary #3a3a3a (#555) | Danger #d33
   ========================================================================== */

:root {
    --bg-main: #1e1e1e;
    --bg-header: #2b2b2b;
    --bg-card: #2b2b2b;
    --bg-card-hover: #333333;
    --bg-input: #1e1e1e;
    --border-color: #3f3f3f;
    --border-light: #555555;
    --border-focus: #4a90e2;
    --text-primary: #f0f0f0;
    --text-secondary: #e0e0e0;
    --text-muted: #c0c0c0;
    --accent-primary: #4a90e2;
    --accent-hover: #357abd;
    --accent-cyan: #4a90e2;
    --status-green: #2ecc71;
    --status-amber: #f39c12;
    --status-red: #d33;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-modal: 0 12px 36px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 12px rgba(74, 144, 226, 0.35);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-secondary);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14.5px;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    font-weight: 600;
}

p {
    color: var(--text-muted);
}

/* NAVBAR HEADER & PROFESSIONAL DROPDOWN NAVIGATION */
.navbar {
    background-color: rgba(43, 43, 43, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.65rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.navbar-start {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-width: 0;
}

.navbar-end {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.2s ease;
    min-width: 0;
}

.brand:hover {
    opacity: 0.95;
}

.brand-logo {
    height: 40px;
    width: 40px;
    flex-shrink: 0;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(74, 144, 226, 0.45));
    transition: transform 0.2s ease, filter 0.2s ease;
}

.brand:hover .brand-logo {
    transform: scale(1.06);
    filter: drop-shadow(0 0 14px rgba(74, 144, 226, 0.7));
}

.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f0f0f0;
    letter-spacing: 0.3px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-subtitle {
    font-size: 0.68rem;
    color: var(--accent-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    white-space: nowrap;
}

/* DESKTOP PILL NAVIGATION & DROPDOWNS */
.nav-desktop {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.nav-item-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 7px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.nav-item-pill:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
}

.nav-item-pill.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.24) 0%, rgba(74, 144, 226, 0.12) 100%);
    border-color: rgba(74, 144, 226, 0.45);
    box-shadow: 0 2px 10px rgba(74, 144, 226, 0.18);
}

.nav-svg-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--accent-primary);
}

.nav-active-subpill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(74, 144, 226, 0.25);
    color: #9ac2f4;
    border: 1px solid rgba(74, 144, 226, 0.4);
}

.nav-chevron {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown.open > [data-nav-dropdown-btn] .nav-chevron {
    transform: rotate(180deg);
    color: #ffffff;
}

.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: #252525;
    border: 1px solid #454545;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.04);
    padding: 8px;
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.98);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.nav-dropdown.open > .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.nav-admin-panel {
    width: 340px;
}

.nav-lang-panel {
    right: 0;
    left: auto;
    width: 215px;
}

.nav-user-panel {
    right: 0;
    left: auto;
    width: 280px;
}

.nav-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px 8px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 6px;
}

.nav-dropdown-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 9px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.15s ease;
    border: 1px solid transparent;
    margin-bottom: 4px;
}

.nav-dropdown-card:last-child {
    margin-bottom: 0;
}

.nav-dropdown-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

.nav-dropdown-card.active {
    background: rgba(74, 144, 226, 0.14);
    border-color: rgba(74, 144, 226, 0.4);
}

.nav-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.nav-card-icon.icon-cyan {
    background: rgba(74, 144, 226, 0.16);
    border: 1px solid rgba(74, 144, 226, 0.35);
}

.nav-card-icon.icon-amber {
    background: rgba(243, 156, 18, 0.16);
    border: 1px solid rgba(243, 156, 18, 0.35);
}

.nav-card-icon.icon-green {
    background: rgba(46, 204, 113, 0.16);
    border: 1px solid rgba(46, 204, 113, 0.35);
}

.nav-card-icon.icon-blue {
    background: rgba(100, 181, 246, 0.16);
    border: 1px solid rgba(100, 181, 246, 0.35);
}

.nav-card-content {
    flex: 1;
    min-width: 0;
}

.nav-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 2px;
}

.nav-card-desc {
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.35;
}

/* LANGUAGE & PROFILE PILLS */
.nav-icon-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.18s ease;
}

.nav-icon-pill:hover {
    background: #383838;
    border-color: var(--border-light);
}

.nav-lang-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 7px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: background 0.15s;
}

.nav-lang-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

.nav-lang-item.active {
    background: rgba(74, 144, 226, 0.18);
    color: #ffffff;
}

.nav-lang-code-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-family: monospace;
}

.nav-profile-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 4px 5px;
    border-radius: 30px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.18s ease;
}

.nav-profile-pill:hover {
    background: #363636;
    border-color: var(--border-light);
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.nav-avatar-lg {
    width: 42px;
    height: 42px;
    font-size: 0.95rem;
}

.avatar-admin {
    background: linear-gradient(135deg, #f39c12 0%, #d68910 100%);
    color: #1a1a1a;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.35);
}

.avatar-user {
    background: linear-gradient(135deg, #4a90e2 0%, #2980b9 100%);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.35);
}

.nav-profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    text-align: left;
}

.nav-profile-name {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-profile-role {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.nav-profile-role.role-admin {
    color: #f39c12;
}

.nav-profile-role.role-user {
    color: #64b5f6;
}

.nav-user-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
}

.nav-user-fullname {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-user-email {
    font-size: 0.76rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-panel-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 6px 0;
}

.nav-menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 7px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 500;
    transition: all 0.15s;
}

.nav-menu-link:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

.nav-menu-link.active {
    background: rgba(74, 144, 226, 0.15);
    color: #64b5f6;
    font-weight: 600;
}

.nav-menu-logout {
    color: #fca5a5;
}

.nav-menu-logout:hover {
    background: rgba(221, 51, 51, 0.18);
    color: #ff8080;
}

/* MOBILE HAMBURGER & SLIDE-OVER DRAWER */
.nav-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    cursor: pointer;
    padding: 0;
}

.hamburger-box {
    width: 20px;
    height: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-line {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.22s ease;
}

.nav-mobile-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.nav-mobile-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}
.nav-mobile-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(3px);
    z-index: 1900;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-nav-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(88vw, 360px);
    height: 100vh;
    height: 100dvh;
    background: #232323;
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.8);
    z-index: 1950;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-nav-drawer.open {
    transform: translateX(0);
}

.mobile-drawer-header {
    padding: 1rem 1.15rem;
    background: #1c1c1c;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-drawer-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.15rem;
}

.mobile-user-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 1.15rem;
}

.mobile-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-left: 2px;
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mobile-nav-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    background: #2b2b2b;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.mobile-nav-card.active {
    background: rgba(74, 144, 226, 0.15);
    border-color: var(--accent-primary);
}

.mobile-lang-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.mobile-lang-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #2b2b2b;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.mobile-lang-chip.active {
    background: rgba(74, 144, 226, 0.2);
    border-color: var(--accent-primary);
    color: #ffffff;
    font-weight: 700;
}

.mobile-drawer-footer {
    padding: 1rem 1.15rem;
    background: #1c1c1c;
    border-top: 1px solid var(--border-color);
}

.badge-role {
    font-size: 0.72rem;
    padding: 3px 9px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-admin {
    background-color: rgba(243, 156, 18, 0.15);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.4);
}

.badge-user {
    background-color: rgba(74, 144, 226, 0.15);
    color: #70a9ee;
    border: 1px solid rgba(74, 144, 226, 0.4);
}

/* LAYOUT CONTAINER */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
    min-width: 0;
    flex: 1;
}

/* CARDS */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

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

.card-body {
    padding: 1.5rem;
}

/* BUTTONS - Matching test.html */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn:hover:not(:disabled) {
    transform: scale(1.02);
}

.btn-primary {
    background-color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    color: #ffffff;
}
.btn-primary:hover:not(:disabled) {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 0 12px rgba(74, 144, 226, 0.4);
}

.btn-secondary {
    background-color: #3a3a3a;
    color: #ffffff;
    border: 1px solid var(--border-light);
}
.btn-secondary:hover:not(:disabled) {
    background-color: #555555;
    border-color: #666666;
    color: #ffffff;
}

.btn-danger {
    background-color: var(--status-red);
    color: #ffffff;
    border: 1px solid var(--status-red);
}
.btn-danger:hover:not(:disabled) {
    background-color: #b22;
    border-color: #b22;
    box-shadow: 0 0 12px rgba(221, 51, 51, 0.4);
}

.btn:disabled, .btn-primary:disabled, .btn-secondary:disabled, .btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
    border-radius: 6px;
}

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

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.form-control {
    width: 100%;
    padding: 9px 13px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.92rem;
    transition: all 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.25);
}

/* TABLES */
.table-responsive {
    overflow-x: auto;
}

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

.table th {
    background-color: #242424;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid #333333;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

/* ALERTS */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-danger {
    background-color: rgba(221, 51, 51, 0.15);
    border: 1px solid rgba(221, 51, 51, 0.35);
    color: #fca5a5;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.35);
    color: #82e0aa;
}

.alert-info {
    background-color: rgba(74, 144, 226, 0.15);
    border: 1px solid rgba(74, 144, 226, 0.35);
    color: #9ac2f4;
}

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

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 4px;
}

/* LOGIN BOX */
.login-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    padding: 2.5rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

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

/* FOOTER */
footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    background-color: var(--bg-header);
}

/* STATUS DOTS */
.status-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.status-dot-green {
    background-color: var(--status-green);
    box-shadow: 0 0 6px var(--status-green);
}

.status-dot-red {
    background-color: var(--status-red);
    box-shadow: 0 0 6px var(--status-red);
}

/* PROGRESS BAR */
.progress-container {
    width: 100%;
    height: 24px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin: 1rem 0;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #357abd, #4a90e2);
    background-size: 30px 30px;
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    animation: progress-stripes 1s linear infinite;
    transition: width 0.25s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.progress-bar-fill.completed {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    animation: none;
}

@keyframes progress-stripes {
    0% { background-position: 0 0; }
    100% { background-position: 30px 0; }
}

/* DANGER ZONE */
.card-danger {
    border-color: rgba(221, 51, 51, 0.4);
    background: linear-gradient(180deg, rgba(221, 51, 51, 0.05) 0%, var(--bg-card) 100%);
}

.card-danger .card-title {
    color: #fca5a5;
}

.step-indicator {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    background-color: rgba(221, 51, 51, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(221, 51, 51, 0.4);
}

/* MODAL POPUPS */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.modal-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: var(--shadow-modal);
    width: 100%;
    overflow: hidden;
    color: var(--text-secondary);
}

.modal-header {
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
}

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

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    background-color: rgba(0, 0, 0, 0.15);
    border-top: 1px solid var(--border-color);
}

/* PAGINATION - GRAY DARK THEME */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.12);
    flex-wrap: wrap;
    gap: 12px;
}

.pagination-info {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    background-color: #3a3a3a;
    border: 1px solid var(--border-light);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background-color: #555555;
    border-color: #666666;
    transform: scale(1.04);
    color: #ffffff;
}

.pagination-btn.active {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #ffffff;
    font-weight: 700;
    cursor: default;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.4);
}

.pagination-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-ellipsis {
    color: var(--text-muted);
    padding: 0 6px;
    font-weight: bold;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.page-size-selector select {
    padding: 6px 12px;
    border-radius: 8px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-light);
    color: #f0f0f0;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s;
}

.page-size-selector select:focus {
    border-color: var(--accent-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.25);
}

/* SWEETALERT2 ELEVATION ABOVE ALL MODALS & GRAY DARK POPUP CUSTOM CLASS */
.swal2-container {
    z-index: 99999 !important;
}

.swal2-dark-popup {
    z-index: 100000 !important;
    border: 1px solid #444 !important;
    border-radius: 10px !important;
    box-shadow: var(--shadow-modal) !important;
    font-family: "Segoe UI", Roboto, Arial, sans-serif !important;
}

.swal2-dark-popup .swal2-title {
    color: #f0f0f0 !important;
}

.swal2-dark-popup .swal2-html-container {
    color: #c0c0c0 !important;
}

.swal2-dark-popup .swal2-confirm {
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 10px 22px !important;
}

.swal2-dark-popup .swal2-cancel {
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 10px 22px !important;
}

/* LICENSE MANAGEMENT & MODAL STYLES */
.btn-license-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(74, 144, 226, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(74, 144, 226, 0.35);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
}

.btn-license-badge:hover {
    background-color: rgba(74, 144, 226, 0.3);
    border-color: var(--accent-primary);
    transform: scale(1.04);
}

.btn-license-badge.empty {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px dashed var(--border-light);
}

.btn-license-badge.empty:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

/* SERIAL CODE DISPLAY (STRICTLY ON A SINGLE LINE) */
.serial-code {
    font-family: Consolas, "Courier New", monospace;
    font-weight: 700;
    font-size: 0.83rem;
    padding: 3px 8px;
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f0f0f0;
    letter-spacing: 0.5px;
    white-space: nowrap;
    display: inline-block;
}

/* SORTING BUTTONS IN MODAL */
.btn-sort {
    background-color: #3a3a3a;
    color: #e0e0e0;
    border: 1px solid var(--border-light);
    padding: 6px 13px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}
.btn-sort:hover {
    background-color: #555555;
    color: #ffffff;
}
.btn-sort.active {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.4);
}

/* LICENSE GROUP CARD & DISTINCT COLOR CODING */
.license-group-card {
    border-radius: 8px;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background-color: #242424;
}

.license-group-header {
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.license-group-table th {
    padding: 7px 12px;
}

.license-group-table td {
    padding: 7px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

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

/* PALETTE COLOR GROUP TINTS FOR IMMEDIATE COLPO D'OCCHIO */
.lic-group-blue {
    border-color: rgba(74, 144, 226, 0.45);
    border-left: 5px solid #4a90e2;
}
.lic-group-blue .license-group-header {
    background-color: rgba(74, 144, 226, 0.18);
    color: #9ac2f4;
}
.lic-group-blue .license-group-table td {
    background-color: rgba(74, 144, 226, 0.04);
}

.lic-group-green {
    border-color: rgba(46, 204, 113, 0.45);
    border-left: 5px solid #2ecc71;
}
.lic-group-green .license-group-header {
    background-color: rgba(46, 204, 113, 0.18);
    color: #82e0aa;
}
.lic-group-green .license-group-table td {
    background-color: rgba(46, 204, 113, 0.04);
}

.lic-group-amber {
    border-color: rgba(243, 156, 18, 0.45);
    border-left: 5px solid #f39c12;
}
.lic-group-amber .license-group-header {
    background-color: rgba(243, 156, 18, 0.18);
    color: #f8c471;
}
.lic-group-amber .license-group-table td {
    background-color: rgba(243, 156, 18, 0.04);
}

.lic-group-purple {
    border-color: rgba(155, 89, 182, 0.45);
    border-left: 5px solid #9b59b6;
}
.lic-group-purple .license-group-header {
    background-color: rgba(155, 89, 182, 0.18);
    color: #d7bde2;
}
.lic-group-purple .license-group-table td {
    background-color: rgba(155, 89, 182, 0.04);
}

.lic-group-teal {
    border-color: rgba(26, 188, 156, 0.45);
    border-left: 5px solid #1abc9c;
}
.lic-group-teal .license-group-header {
    background-color: rgba(26, 188, 156, 0.18);
    color: #a3e4d7;
}
.lic-group-teal .license-group-table td {
    background-color: rgba(26, 188, 156, 0.04);
}

.lic-group-orange {
    border-color: rgba(230, 126, 34, 0.45);
    border-left: 5px solid #e67e22;
}
.lic-group-orange .license-group-header {
    background-color: rgba(230, 126, 34, 0.18);
    color: #edbb99;
}
.lic-group-orange .license-group-table td {
    background-color: rgba(230, 126, 34, 0.04);
}

/* ==========================================================================
   REMOTE VOYAGER STATIONS CARDS & LIVE TELEMETRY STYLES
   ========================================================================== */

.stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 410px), 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.station-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 1.25rem 1.25rem;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.station-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), var(--shadow-glow);
}

.station-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.station-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.station-card-id {
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(74, 144, 226, 0.15);
    color: var(--accent-cyan);
    padding: 2px 7px;
    border-radius: 4px;
    display: inline-block;
}

.station-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.badge-online {
    background: rgba(46, 204, 113, 0.18);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.35);
}

.badge-standby {
    background: rgba(243, 156, 18, 0.18);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.35);
}

.badge-offline {
    background: rgba(150, 150, 150, 0.15);
    color: #999999;
    border: 1px solid rgba(150, 150, 150, 0.3);
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.badge-online .live-dot {
    background-color: #2ecc71;
    box-shadow: 0 0 8px #2ecc71;
    animation: livePulse 1.8s infinite;
}

.badge-standby .live-dot {
    background-color: #f39c12;
    box-shadow: 0 0 6px #f39c12;
}

.badge-offline .live-dot {
    background-color: #888888;
}

@keyframes livePulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(46, 204, 113, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

.live-pulse-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    transition: opacity 0.3s ease;
}

.station-id-strip {
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    margin-bottom: 1rem;
    font-size: 0.82rem;
}

.station-id-strip-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.station-strip-label {
    width: 56px;
    min-width: 56px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.station-id-strip .serial-code {
    display: block;
    flex: 1;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.72rem;
    letter-spacing: 0;
    padding: 4px 6px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 5px;
}

.station-id-strip-row + .station-id-strip-row {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.06);
}

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

.serial-netid-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.serial-netid-label {
    width: 58px;
    min-width: 58px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.serial-netid-row .serial-code {
    letter-spacing: 0;
}

.station-telemetry-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.telemetry-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    min-height: 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.telemetry-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 2px;
}

.telemetry-val {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.station-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    transition: gap 0.2s ease, color 0.2s ease;
}

.station-card:hover .station-open-btn {
    color: #64b5f6;
    gap: 10px;
}

/* ==========================================================================
   PAGE HEADERS, MODAL GRIDS & SMARTPHONE RESPONSIVE SYSTEM
   ========================================================================== */

.page-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 12px;
}

.station-detail-header-right {
    text-align: right;
}

.station-launch-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.lic-add-grid {
    display: grid;
    grid-template-columns: 2fr 1.6fr 2fr 1.2fr;
    gap: 12px;
    align-items: flex-end;
}

.lic-new-group-grid {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.lic-modal-serial-code {
    width: 345px;
    min-width: 345px;
    max-width: 100%;
    text-align: left;
    box-sizing: border-box;
}

.lic-serial-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 960px) {
    .lic-add-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 860px) {
    .navbar {
        padding: 0.55rem 1rem;
    }

    .nav-desktop,
    .nav-user-dropdown-wrap {
        display: none !important;
    }

    .nav-mobile-toggle {
        display: inline-flex;
    }

    .brand-title {
        font-size: 0.98rem;
        max-width: 190px;
    }

    .brand-subtitle {
        font-size: 0.62rem;
    }

    .container {
        padding: 1.25rem 0.9rem;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 1rem 0.75rem;
    }

    .brand-logo {
        width: 34px;
        height: 34px;
    }

    .brand-title {
        font-size: 0.9rem;
        max-width: 155px;
    }

    /* Compact 2x2 KPI / Stats Grid on Smartphones */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .stat-card {
        padding: 0.9rem 1rem;
    }

    .stat-label {
        font-size: 0.72rem;
    }

    .stat-value {
        font-size: 1.35rem;
    }

    .card-header {
        padding: 0.85rem 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .modal-backdrop {
        padding: 8px;
    }

    .modal-header,
    .modal-footer {
        padding: 0.85rem 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .login-wrapper {
        min-height: 70vh;
    }

    .login-card {
        padding: 1.5rem 1.25rem;
    }

    .pagination-wrapper {
        justify-content: center;
        padding: 0.85rem 1rem;
        text-align: center;
    }

    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .station-detail-header-right {
        text-align: left;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px;
        padding-top: 8px;
        border-top: 1px dashed rgba(255, 255, 255, 0.08);
    }

    .station-launch-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .station-launch-actions .btn {
        width: 100%;
        justify-content: space-between;
    }

    .lic-add-grid,
    .lic-new-group-grid {
        grid-template-columns: 1fr !important;
    }

    .lic-modal-serial-code {
        width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 180px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .serial-code {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .users-filter-form > div,
    .users-filter-form > .btn {
        width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 100% !important;
    }
}

@media (max-width: 380px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .brand-subtitle {
        display: none;
    }
}


