/* Office Kiosk - Modern Premium Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #0f172a;
    /* Dark slate background */
    --bg-card: rgba(30, 41, 59, 0.7);
    /* Translucent slate card */
    --bg-card-hover: rgba(30, 41, 59, 0.9);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-focus: rgba(16, 185, 129, 0.5);
    /* Emerald focus */

    /* Brand Colors */
    --color-accent: #10b981;
    /* Emerald Green for success/actions */
    --color-accent-hover: #059669;
    --color-warning: #f43f5e;
    /* Rose Red for cancel/danger */
    --color-warning-hover: #e11d48;
    --color-highlight: #f59e0b;
    /* Amber for alerts/attention */

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Border Radius & Shadow */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);

    /* Touch target dimensions */
    --touch-min: 60px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    /* Prevent accidental text highlighting during touch */
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

/* Layout shell */
#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* App Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    height: 80px;
    border-bottom: 1px solid var(--border-color);
}

.header-title h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Button system */
button {
    font-family: inherit;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    min-height: 48px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button:active {
    transform: scale(0.97);
}

.btn-primary {
    background-color: var(--color-accent);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
}

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

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

.btn-danger {
    background-color: var(--color-warning);
    color: #ffffff;
}

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

/* Main View container */
main {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.view-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

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

/* Utility layout classes */
.grid {
    display: grid;
    gap: 1.5rem;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

/* Modal Overlay & Card styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    animation: fadeIn 0.2s forwards;
}

.modal-content {
    width: 90%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    transform: translateY(20px);
    animation: slideUp 0.2s 0.05s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* View 1: User Selection Screen Layout */
.user-selection-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    height: 100%;
}

.guest-section {
    display: flex;
    flex-direction: column;
}

.guest-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: var(--radius-lg);
    padding: 2rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(30, 41, 59, 0.7) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.guest-card:active {
    transform: scale(0.98);
    border-color: var(--color-accent);
}

.guest-card .material-icons-round {
    font-size: 4rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.guest-card h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.users-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
}

.search-container {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-input-wrapper .material-icons-round {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-bar {
    width: 100%;
    height: 52px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding-left: 3rem;
    padding-right: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-bar:focus {
    border-color: var(--border-color-focus);
    background: rgba(255, 255, 255, 0.08);
}

.users-grid-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.user-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.user-card:active {
    transform: scale(0.97);
}

.user-avatar {
    width: 76px;
    height: 76px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
    border: 2px solid var(--border-color);
    box-sizing: border-box;
}

.user-name-full {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.user-name-login {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* View 2: Product Selection Screen Layout */
.product-selection-layout {
    display: grid;
    grid-template-columns: 220px 1fr 340px;
    gap: 1.5rem;
    height: 100%;
}

.categories-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
}

.category-tab {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    aspect-ratio: 1.35;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.2s;
}

.category-tab .material-icons-round {
    font-size: 2.2rem;
}

.category-tab.active {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.products-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
}

.products-grid-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    position: relative;
    transition: transform 0.2s, background-color 0.2s;
}

.product-card:active {
    transform: scale(0.97);
}

.product-img-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    overflow: hidden;
    padding: 0.5rem;
}

.product-img-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-brand {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.product-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    flex: 1;
    line-height: 1.25;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-size {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.product-price {
    font-weight: 700;
    color: var(--color-accent);
}

/* Cart Panel (Right side) */
.cart-panel {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

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

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.cart-item-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-icon {
    min-height: 36px;
    width: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
}

.header-controls button {
    height: 48px;
    min-height: 48px;
    padding: 0 1.25rem;
    box-sizing: border-box;
}

.header-controls .btn-icon {
    width: 48px;
    padding: 0;
    border-radius: var(--radius-md);
}

.cart-item-count {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}

.cart-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.cart-total-label {
    font-size: 1.1rem;
    font-weight: 500;
}

.cart-total-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-accent);
}

.cart-checkout-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* View 3: Administration Panel Layout */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    height: 100%;
}

.admin-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-tab {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-align: left;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.admin-tab.active {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.admin-content {
    overflow-y: auto;
    padding-right: 0.5rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

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

.admin-table th {
    font-weight: 600;
    color: var(--text-secondary);
}

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

/* Form Styling */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.form-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

.form-input:focus {
    border-color: var(--border-color-focus);
}

select option {
    background-color: #1e293b;
    color: var(--text-primary);
}


.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Product Info Button on Card */
.btn-product-info {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
}

.btn-product-info:hover {
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Toast Notification System */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    pointer-events: auto;
    transform: translateX(-120%);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    max-width: 420px;
}

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

.toast .material-icons-round {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.toast-success {
    border-left: 4px solid var(--color-accent);
}

.toast-success .material-icons-round {
    color: var(--color-accent);
}

.toast-error {
    border-left: 4px solid var(--color-warning);
}

.toast-error .material-icons-round {
    color: var(--color-warning);
}

.toast-warning {
    border-left: 4px solid var(--color-highlight);
}

.toast-warning .material-icons-round {
    color: var(--color-highlight);
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-info .material-icons-round {
    color: #3b82f6;
}

/* Spinner Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Reddish warning pulse for payment/topup buttons when locked out */
@keyframes pulse-red-border {
    0% {
        box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7);
        border-color: var(--color-warning);
        background-color: rgba(244, 63, 94, 0.1);
    }

    50% {
        box-shadow: 0 0 14px 4px rgba(244, 63, 94, 0.6);
        border-color: var(--color-warning-hover);
        background-color: rgba(244, 63, 94, 0.3);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(244, 63, 94, 0);
        border-color: var(--color-warning);
        background-color: rgba(244, 63, 94, 0.1);
    }
}

.btn-pulse-warning-red {
    border: 1px solid var(--color-warning) !important;
    color: var(--text-primary) !important;
    animation: pulse-red-border 1.8s infinite ease-in-out;
}

/* Yellow/amber warning pulse for profile button when password check is disabled */
@keyframes pulse-yellow-border {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
        border-color: var(--color-highlight);
        background-color: rgba(245, 158, 11, 0.1);
    }

    50% {
        box-shadow: 0 0 14px 4px rgba(245, 158, 11, 0.6);
        border-color: var(--color-highlight);
        background-color: rgba(245, 158, 11, 0.25);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
        border-color: var(--color-highlight);
        background-color: rgba(245, 158, 11, 0.1);
    }
}

.btn-pulse-warning-yellow {
    border: 1px solid var(--color-highlight) !important;
    color: var(--text-primary) !important;
    animation: pulse-yellow-border 1.8s infinite ease-in-out;
}

/* Language selector styling */
.lang-selector-header {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-sizing: border-box;
    height: 48px;
    margin-right: 0.5rem;
}

.lang-selector-header .btn-lang-select {
    border: none;
    background: transparent;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0 0.75rem;
    height: 100%;
    min-height: unset;
    border-radius: calc(var(--radius-md) - 3px);
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    box-shadow: none;
}

.lang-selector-header .btn-lang-select.active {
    background: var(--color-accent);
    color: #ffffff;
}

.lang-selector-header .btn-lang-select:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* Beta version badge */
.badge-beta {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
    vertical-align: middle;
    margin-left: 0.75rem;
    line-height: 1;
    -webkit-text-fill-color: #818cf8;
}

/* Slider toggle switch styles */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    vertical-align: middle;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.08);
    transition: .3s;
    border-radius: 24px;
    border: 1px solid var(--border-color);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

input:checked+.slider {
    background-color: var(--color-accent);
    border-color: rgba(16, 185, 129, 0.2);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

/* Subtle admin pending notification styling */
.admin-btn-has-pending {
    position: relative !important;
}

.admin-btn-has-pending .material-icons-round {
    color: var(--color-highlight) !important;
}

.admin-btn-has-pending::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    background-color: var(--color-highlight);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--color-highlight);
}

/* Profile Modal Two-Column Layout Response styles */
@media (max-width: 768px) {
    .profile-split-container {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }
}

/* Secret admin pending notification dot next to title */
.secret-pending-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--color-highlight);
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
    box-shadow: 0 0 6px var(--color-highlight);
    animation: secret-pulse 2s infinite ease-in-out;
}

@keyframes secret-pulse {
    0% {
        transform: scale(0.85);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 8px 4px rgba(245, 158, 11, 0);
    }

    100% {
        transform: scale(0.85);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

/* Screensaver */
.screensaver-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: auto;
    display: none;
}

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

#screensaver-content {
    position: absolute;
    color: rgba(255, 255, 255, 0.4);
    /* Dim white to prevent burn-in */
    text-align: center;
    pointer-events: none;
    /* Let touches pass through to overlay */
}

#screensaver-content h1 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

#screensaver-content p {
    font-size: 1.5rem;
    animation: pulseText 3s infinite alternate;
}

@keyframes pulseText {
    0% {
        opacity: 0.3;
    }

    100% {
        opacity: 0.8;
    }
}

/* SIMON SAYS GAME STYLES */
.simon-board {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 15px;
    width: 300px;
    height: 300px;
    margin: 2rem auto;
    background: var(--surface-secondary, #2a2a35);
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.simon-pad {
    border-radius: 10px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.15s ease-in-out;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.simon-pad:active {
    transform: scale(0.95);
}

.simon-pad.active {
    opacity: 1;
    filter: brightness(1.5);
    box-shadow: 0 0 20px currentColor;
    transform: scale(1.05);
}

.pad-red {
    background-color: #ff4757;
    color: #ff4757;
}

.pad-blue {
    background-color: #1e90ff;
    color: #1e90ff;
}

.pad-green {
    background-color: #2ed573;
    color: #2ed573;
}

.pad-yellow {
    background-color: #eccc68;
    color: #eccc68;
}

.simon-info {
    text-align: center;
    margin-bottom: 1rem;
}

.simon-info h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.simon-info p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.simon-start-btn {
    display: block;
    margin: 1.5rem auto 0;
    padding: 0.8rem 2rem;
    font-size: 1.2rem;
    background: var(--primary-color, #3498db);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.simon-start-btn:hover {
    filter: brightness(1.1);
}

/* SuperAdmin & Tenant Switcher Styles */
.tenant-switcher-container {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
}

.tenant-switcher-select {
    background: transparent;
    color: var(--color-accent);
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    outline: none;
}

.tenant-switcher-select option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.badge-superadmin {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tenant-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.tenant-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

.tenant-card.active {
    border-color: var(--color-accent);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

/* Virtual ATM-Style Numpad */
.virtual-numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
    max-width: 250px;
    margin-left: auto;
    margin-right: auto;
}

.virtual-numpad .numpad-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    -webkit-user-select: none;
}

.virtual-numpad .numpad-btn:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.95);
}

.virtual-numpad .numpad-btn.numpad-action {
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-secondary);
}

.virtual-numpad .numpad-btn.numpad-action:active {
    background: rgba(15, 23, 42, 0.8);
}


/* --- Floating Screensaver Products --- */
.floating-product {
    position: absolute;
    width: 200px;
    height: auto;
    object-fit: contain;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.5));
}

@keyframes float-drift-1 {
    0% {
        opacity: 0;
        transform: translate(0, 0) rotate(-10deg) scale(0.8);
    }

    20% {
        opacity: 0.85;
        transform: translate(15vw, -10vh) rotate(5deg) scale(1);
    }

    80% {
        opacity: 0.85;
        transform: translate(45vw, -30vh) rotate(20deg) scale(1.1);
    }

    100% {
        opacity: 0;
        transform: translate(60vw, -40vh) rotate(35deg) scale(0.9);
    }
}

@keyframes float-drift-2 {
    0% {
        opacity: 0;
        transform: translate(0, 0) rotate(15deg) scale(0.9);
    }

    20% {
        opacity: 0.85;
        transform: translate(-10vw, -15vh) rotate(0deg) scale(1.05);
    }

    80% {
        opacity: 0.85;
        transform: translate(-35vw, -45vh) rotate(-15deg) scale(1.15);
    }

    100% {
        opacity: 0;
        transform: translate(-45vw, -60vh) rotate(-25deg) scale(1);
    }
}

@keyframes float-drift-3 {
    0% {
        opacity: 0;
        transform: translate(0, 0) rotate(-5deg) scale(0.85);
    }

    20% {
        opacity: 0.85;
        transform: translate(20vw, 10vh) rotate(-20deg) scale(1.1);
    }

    80% {
        opacity: 0.85;
        transform: translate(50vw, 35vh) rotate(-45deg) scale(1.2);
    }

    100% {
        opacity: 0;
        transform: translate(65vw, 50vh) rotate(-60deg) scale(1);
    }
}

@keyframes float-drift-4 {
    0% {
        opacity: 0;
        transform: translate(0, 0) rotate(25deg) scale(0.8);
    }

    20% {
        opacity: 0.85;
        transform: translate(-15vw, 15vh) rotate(10deg) scale(1);
    }

    80% {
        opacity: 0.85;
        transform: translate(-40vw, 40vh) rotate(-5deg) scale(1.1);
    }

    100% {
        opacity: 0;
        transform: translate(-55vw, 55vh) rotate(-20deg) scale(0.9);
    }
}