﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ===== Global base ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1d29 0%, #252b3d 25%, #2f3549 50%, #252b3d 75%, #1a1d29 100%);
    min-height: 100vh;
    color: #ffffff;
    position: relative;
    overflow-x: hidden;
    padding: 20px;
}

    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle at 20% 80%, rgba(74, 144, 226, 0.08) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(91, 160, 242, 0.12) 0%, transparent 50%), radial-gradient(circle at 40% 40%, rgba(255,255,255,0.03) 0%, transparent 50%);
        pointer-events: none;
        z-index: -1;
    }

.app-container {
    /*max-width: 3000px;*/
    margin: 0 auto;
}

/* ===== Card / main layout ===== */
.card {
    background: linear-gradient(135deg, rgba(47, 53, 73, 0.8), rgba(37, 43, 61, 0.9));
    border-radius: 15px;
    padding: 18px 20px 20px;
    border: 1px solid rgba(74, 144, 226, 0.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* ===== Header ===== */
.header {
    text-align: center;
    margin-bottom: 16px;
}

.header-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 16px auto;
    border: 3px solid rgba(74, 144, 226, 0.5);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #666;
    overflow: hidden;
}

    .header-logo img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
    }

.header h1 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #ffffff, #4a90e2, #5ba0f2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 0.9rem;
    opacity: 0.9;
    color: #a8b4c7;
}

    .header p span.highlight {
        color: #facc15;
        font-weight: 600;
    }

/* ===== Server select bar ===== */
.server-select {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 10px 0 14px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #cbd5f5;
}

    .server-select label {
        font-weight: 500;
    }

    .server-select select,
    .server-select input[type="number"] {
        padding: 7px 10px;
        border-radius: 999px;
        border: 1px solid rgba(74, 144, 226, 0.4);
        background: linear-gradient(135deg, rgba(47, 53, 73, 0.9), rgba(37, 43, 61, 0.9));
        color: #e5e7eb;
        font-size: 13px;
        outline: none;
        min-width: 130px;
    }

        .server-select select:focus,
        .server-select input[type="number"]:focus {
            border-color: #4a90e2;
            box-shadow: 0 0 0 3px rgba(74,144,226,0.25);
        }

/* ===== Tabs & legend ===== */
.tabs-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    gap: 12px;
    flex-wrap: wrap;
}

    .tabs-header h2 {
        font-size: 16px;
        font-weight: 600;
        color: #e7ecf7;
    }

.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #a8b4c7;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid;
}

.legend-available .legend-color {
    background: rgba(46, 204, 113, 0.3);
    border-color: #2ecc71;
}

.legend-reserved .legend-color {
    background: rgba(231, 76, 60, 0.3);
    border-color: #e74c3c;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(74, 144, 226, 0.3);
    padding-bottom: 12px;
}

.tab {
    flex: 1;
    min-width: 140px;
    text-align: center;
    padding: 10px 8px;
    border-radius: 10px;
    border: 1px solid rgba(74, 144, 226, 0.3);
    background: linear-gradient(135deg, rgba(47, 53, 73, 0.6), rgba(37, 43, 61, 0.7));
    cursor: pointer;
    font-size: 13px;
    color: #a8b4c7;
    font-weight: 600;
    transition: all 0.25s ease;
}

    .tab:hover {
        background: linear-gradient(135deg, rgba(74, 144, 226, 0.2), rgba(91, 160, 242, 0.3));
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
        color: #ffffff;
    }

    .tab.active {
        background: linear-gradient(135deg, #4a90e2, #5ba0f2);
        color: white;
        box-shadow: 0 4px 15px rgba(74,144,226,0.4);
        border-color: #4a90e2;
    }

/* ===== Summary text ===== */
.summary {
    font-size: 12px;
    color: #a8b4c7;
    margin-bottom: 12px;
    text-align: center;
}

/* ===== Time grid ===== */
.time-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

@media (max-width: 1024px) {
    .time-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .time-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .time-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Time slots ===== */
.time-slot {
    background: linear-gradient(135deg, rgba(47, 53, 73, 0.5), rgba(37, 43, 61, 0.6));
    border: 2px solid rgba(74, 144, 226, 0.3);
    border-radius: 12px;
    padding: 12px 12px 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    min-height: 70px;
    font-size: 12px;
}

    .time-slot.available {
        border-color: rgba(46, 204, 113, 0.6);
    }

        .time-slot.available:hover {
            background: linear-gradient(135deg, rgba(46, 204, 113, 0.2), rgba(46, 204, 113, 0.3));
            border-color: #2ecc71;
            box-shadow: 0 8px 25px rgba(46, 204, 113, 0.4);
            transform: translateY(-3px);
        }

    .time-slot.reserved {
        border-color: rgba(231, 76, 60, 0.6);
        background: linear-gradient(135deg, rgba(231, 76, 60, 0.15), rgba(231, 76, 60, 0.2));
    }

        .time-slot.reserved:hover {
            border-color: #e74c3c;
            box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
            transform: translateY(-3px);
        }

.time-label {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 6px;
    color: #ffffff;
}

.member-info {
    font-size: 0.85rem;
    color: #a8b4c7;
}

/* status badge same style as original */
.status-badge {
    position: absolute;
    top: 8px;
    right: 10px;
    padding: 4px 9px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-available {
    background: rgba(46, 204, 113, 0.3);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.5);
}

.status-reserved {
    background: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.5);
}

/* ===== Modals (booking / cancel / result) ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    padding-top: 80px;
    z-index: 1000;
}
.bootstrap-modal {
    /* Let Bootstrap control the background / blur. */
    background-color: transparent;
    backdrop-filter: none;
    padding-top: 0;
    /* Put it above the Bootstrap backdrop */
    z-index: 1055;
}
.modal-content {
    background: linear-gradient(135deg, #252b3d, #2f3549);
    margin: 0 auto;
    padding: 24px 22px 18px;
    max-width: 480px;
    border-radius: 15px;
    border: 1px solid rgba(74, 144, 226, 0.3);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    position: relative;
}

.modal h2 {
    margin-bottom: 16px;
    color: #ffffff;
    text-align: center;
    font-size: 18px;
}

.close {
    position: absolute;
    right: 15px;
    top: 12px;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    color: #a8b4c7;
    transition: color 0.3s ease;
}

    .close:hover {
        color: #ffffff;
    }

.modal-message {
    font-size: 13px;
    margin-bottom: 8px;
    color: #e5e7eb;
}

/* Form fields inside modals */
.form-group {
    margin-bottom: 14px;
    font-size: 12px;
}

    .form-group label {
        display: block;
        margin-bottom: 6px;
        color: #a8b4c7;
        font-weight: 600;
    }

    .form-group input,
    .form-group textarea {
        width: 100%;
        padding: 10px 12px;
        border: 2px solid rgba(74, 144, 226, 0.3);
        border-radius: 8px;
        background: rgba(47, 53, 73, 0.5);
        color: #ffffff;
        font-size: 0.9rem;
        outline: none;
        transition: all 0.3s ease;
    }

        .form-group input:focus,
        .form-group textarea:focus {
            border-color: #4a90e2;
            background: rgba(47, 53, 73, 0.7);
            box-shadow: 0 0 0 3px rgba(74,144,226,0.2);
        }

        .form-group input::placeholder,
        .form-group textarea::placeholder {
            color: rgba(255,255,255,0.5);
        }

/* Buttons */
.button-row,
.button-group {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.25s ease;
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    }

.btn-primary {
    background: linear-gradient(135deg, #4a90e2, #5ba0f2);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, rgba(47, 53, 73, 0.8), rgba(37, 43, 61, 0.9));
    color: #ffffff;
    border: 1px solid rgba(74, 144, 226, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

/* ===== Admin + Navigation + Home hub + Tokens ===== */

/* Admin card wrapper */
.admin-card {
    margin-top: 16px;
}

/* Make the admin card wider on desktop */
.card.admin-card {
    max-width: 3000px;
}

/* Admin header text tweaked for admin pages */
.admin-card .header h1 {
    color: #e8f1ff;
}

.admin-card .header p {
    color: #c0cffc;
}

/* Admin token form */
.token-form label {
    font-size: 16px;
    font-weight: 600;
    color: #e7edff;
}

.token-form .form-control,
.token-form .form-select {
    font-size: 16px;
    padding: 10px 14px;
    color: #f0f4ff;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

    .token-form .form-control::placeholder {
        color: #9aa3c3;
    }

/* Admin table – final version */
.admin-table {
    width: 100%;
    margin-top: 20px;
    border-collapse: separate;
    border-spacing: 0 6px;
    font-size: 15px;
}

    .admin-table thead th {
        background: rgba(255, 255, 255, 0.06);
        padding: 10px 14px;
        color: #e0e8ff;
        font-weight: 600;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    .admin-table tbody tr {
        background: rgba(255, 255, 255, 0.04);
    }

        .admin-table tbody tr td {
            padding: 10px 14px;
            color: #d8dff8;
        }

        .admin-table tbody tr.row-disabled {
            opacity: 0.45;
        }

    /* Code-style token display */
    .admin-table code {
        font-size: 14px;
        color: #ff7b7b;
    }

/* Admin “status” helper text */
.admin-status {
    margin-top: 8px;
    font-size: 11px;
    color: #9ca3af;
}

    .admin-status.ok {
        color: #4ade80;
    }

    .admin-status.error {
        color: #f97373;
    }

.admin-table td,
.admin-table th {
    width: auto;
}

    /* Optional: define more comfortable widths */
    .admin-table th:nth-child(1) {
        width: 45%;
    }
    /* Label */
    .admin-table th:nth-child(2) {
        width: 15%;
    }
    /* Sort Order */
    .admin-table th:nth-child(3) {
        width: 15%;
    }
    /* Active */
    .admin-table th:nth-child(4) {
        width: 25%;
    }


/* Actions */

/* Small badges (if/when you use them again) */
.badges {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 6px;
    text-align: right;
}

.badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 999px;
    background: #111827;
    border: 1px solid #4b5563;
    margin-left: 4px;
}

.badge-muted {
    opacity: 0.7;
}

/* Admin link cell with copy button */
.admin-link-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

    .admin-link-cell input {
        flex: 1;
    }

/* Tiny bootstrap-style buttons */
.btn-xs {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 6px;
    box-shadow: none;
}

/* Top navigation bar for WoS hub */
.wos-nav {
    background: linear-gradient(135deg, #111827, #1f2937);
    border-bottom: 1px solid rgba(74, 144, 226, 0.35);
    box-shadow: 0 4px 18px rgba(0,0,0,0.6);
}

.wos-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.wos-nav .navbar-brand {
    font-size: 1.1rem;
    letter-spacing: 0.03em;
}

/* Main content wrapper */
.wos-main {
    min-height: calc(100vh - 120px); /* leave room for header/footer */
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Home hub layout */
.home-hub {
    width: 100%;
    max-width: 1200px;
    margin-top: 20px;
}

.home-hub-header {
    text-align: center;
    margin-bottom: 22px;
}

    .home-hub-header h1 {
        font-size: 2rem;
        font-weight: 700;
        background: linear-gradient(135deg, #ffffff, #4a90e2, #5ba0f2);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        text-shadow: 0 2px 4px rgba(0,0,0,0.4);
    }

    .home-hub-header p {
        font-size: 0.95rem;
        color: #a8b4c7;
    }

.home-hub-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.home-card {
    text-align: center;
}

    .home-card .card-title,
    .home-card h2 {
        font-size: 1.3rem;
        font-weight: 700;
        background: linear-gradient(135deg, #ffffff, #4a90e2, #5ba0f2);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        margin-bottom: 6px;
    }

    .home-card .card-text {
        color: #cbd5f5;
        margin-top: 6px;
    }

.home-button-group {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 14px;
}

    .home-button-group .btn {
        min-width: 160px;
        text-align: center;
    }

/* Support / donation box */
.support-box {
    background: linear-gradient(135deg, rgba(74,144,226,0.18), rgba(91,160,242,0.22));
    border: 1px solid rgba(74,144,226,0.45);
    box-shadow: 0 6px 20px rgba(74,144,226,0.25);
    border-radius: 14px;
    padding: 16px 18px;
    margin: 0 auto 18px auto;
    max-width: 850px;
    text-align: center;
    color: #e7ecf7;
}

.support-title {
    font-size: 1.15rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #4a90e2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    text-shadow: 0 2px 6px rgba(74,144,226,0.5);
}

.support-text {
    font-size: 0.9rem;
    line-height: 1.4rem;
    opacity: 0.95;
}

.support-options {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.support-item {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: 8px;
}

    .support-item a {
        color: #4a90e2;
        font-weight: bold;
        text-decoration: none;
    }

        .support-item a:hover {
            text-decoration: underline;
        }

.support-footer {
    margin-top: 12px;
    font-size: 0.85rem;
    opacity: 0.8;
    color: #cbd5f5;
}

/* Icon wrappers + animations */
.icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

/* Frost star SVG */
.frost-icon {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 6px rgba(139, 233, 255, 0.8));
    animation: frostPulse 2.5s infinite ease-in-out;
}

/* Coffee icon bounce */
.icon-bounce {
    font-size: 1.2rem;
    animation: iconBounce 1.8s infinite ease-in-out;
}

/* Frost star pulse animation */
@keyframes frostPulse {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.15) rotate(8deg);
        opacity: 1;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.9;
    }
}

/* Coffee bounce animation */
@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-3px);
    }

    60% {
        transform: translateY(-1px);
    }
}

/* Legend icons (green check / red X) */
.legend-status-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 6px;
    font-size: 14px;
}

/* Green check */
.legend-check {
    background: rgba(46, 204, 113, 0.25);
    border: 1px solid rgba(46, 204, 113, 0.5);
    color: #2ecc71;
}

    .legend-check::after {
        content: "✔";
    }

/* Red X */
.legend-x {
    background: rgba(231, 76, 60, 0.25);
    border: 1px solid rgba(231, 76, 60, 0.5);
    color: #e74c3c;
}

    .legend-x::after {
        content: "✘";
    }

/* --- Token actions styled like booking slots --- */

.token-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.token-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 12px; /* same rounded feel as time slots */
    border: 2px solid rgba(74, 144, 226, 0.3);
    background: linear-gradient(135deg, rgba(47, 53, 73, 0.5), rgba(37, 43, 61, 0.6));
    color: #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .token-action-btn i {
        font-size: 0.9rem;
    }

/* blue border – for COPY */
.token-action-neutral {
    border-color: rgba(74, 144, 226, 0.7);
}

/* green border – similar to available slot */
.token-action-success {
    border-color: rgba(46, 204, 113, 0.6);
}

/* red border – similar to reserved slot */
.token-action-danger {
    border-color: rgba(231, 76, 60, 0.6);
}

.token-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* subtle glow per type */
.token-action-neutral:hover {
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.4);
}

.token-action-success:hover {
    box-shadow: 0 4px 16px rgba(46, 204, 113, 0.4);
}

.token-action-danger:hover {
    box-shadow: 0 4px 16px rgba(231, 76, 60, 0.4);
}

/* Pagination (single clean version) */
.pagination-nav {
    margin-top: 16px;
    display: flex;
    justify-content: center;
}

.pagination {
    list-style: none;
    display: flex;
    gap: 6px;
    padding: 0;
    margin: 0;
}

    .pagination li a {
        display: block;
        padding: 6px 12px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.04);
        color: #d8dff8;
        font-size: 14px;
        text-decoration: none;
    }

    .pagination li.active a {
        background: #2563eb;
        color: #f9fafb;
    }

    .pagination li a:hover {
        background: rgba(37, 99, 235, 0.9);
    }

/* Bootstrap-based modals (Owner / Tokens) – keep them above backdrop */
.bootstrap-modal {
    background-color: transparent;
    backdrop-filter: none;
    padding-top: 0;
    z-index: 1055;
}

.modal-backdrop {
    z-index: 1050;
}
