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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a1a0d;
    color: #f0f0f0;
    min-height: 100vh;
    line-height: 1.5;
    padding-top: 60px;
    scrollbar-gutter: stable; /* Prevents layout shift when modal opens/closes */
}

.nav {
    background: #1a2f1e;
    border-bottom: 3px solid #22c55e;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    height: 60px;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-links a {
    padding: 0.5rem 1rem;
    color: #d0d0d0;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-links a:hover {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.nav-links a.active {
    background: #22c55e;
    color: #0a1a0d;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: #d0d0d0;
	margin-left: auto;
}

.logout-btn {
    background: #dc2626;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.logout-btn:hover {
    background: #b91c1c;
}

.filters {
    background: #152619;
    border-bottom: 1px solid #22c55e;
    padding: 1rem;
    position: sticky;
    top: 60px;
    z-index: 90;
}

.filters-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filter-select {
    background: #1a2f1e;
    border: 1px solid #22c55e;
    color: #f0f0f0;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    min-width: 140px;
}

.filter-select:focus {
    outline: none;
    border-color: #16a34a;
}

/* Date filter with calendar button - seamless look */
.date-filter-select.has-calendar {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
}

.date-picker-btn {
    background: #22c55e;
    border: 1px solid #22c55e;
    border-left: 1px solid rgba(255,255,255,0.2);
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    color: #0d1f12;
    padding: 0 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date-picker-btn:hover {
    background: #16a34a;
    border-color: #16a34a;
}

.date-picker-btn:active {
    background: #15803d;
    transform: scale(0.98);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    margin-top: 1rem;
}

.card {
    background: #152619;
    border: 1px solid #22c55e;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #22c55e;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #22c55e;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-success {
    background: #22c55e;
    color: #0a1a0d;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
}


.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-info {
    background: #06b6d4;
    color: white;
}

.btn-info:hover {
    background: #0891b2;
}



.search-bar {
    margin-bottom: 1rem;
}

.form-input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: #1a2f1e;
    border: 1px solid #22c55e;
    border-radius: 4px;
    color: #f0f0f0;
    font-size: 0.85rem;
}

.form-input:focus {
    outline: none;
    border-color: #16a34a;
}

.data-table {
    width: 100%;
    table-layout: fixed;
    background: #152619;
    border-radius: 6px;
    border: 1px solid #22c55e;
}

.data-table th,
.data-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid rgba(34, 197, 94, 0.2);
    font-size: 0.85rem;
}

.data-table td:last-child {
    padding: 1rem 0.8rem;
}

.data-table .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    min-width: 60px;
}

.data-table .btn:last-child {
    margin-right: 0;
}

/* Vertical action button container */
.actions-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-start;
}

.actions-vertical .btn {
    width: 100%;
    min-width: 70px;
    max-width: 90px;
    margin: 0;
}

.data-table th {
    background: #22c55e;
    font-weight: 600;
    color: #0a1a0d;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.data-table td {
    color: #f0f0f0;
    white-space: normal;
    word-wrap: break-word;
    overflow: visible;
}

.data-table tbody tr:hover {
    background: rgba(34, 197, 94, 0.1);
}

/* Table column widths - Admins (8 columns) */
#adminsTable th:nth-child(1), #adminsTable td:nth-child(1) { width: 10%; }
#adminsTable th:nth-child(2), #adminsTable td:nth-child(2) { width: 13%; }
#adminsTable th:nth-child(3), #adminsTable td:nth-child(3) { width: 18%; }
#adminsTable th:nth-child(4), #adminsTable td:nth-child(4) { width: 12%; }
#adminsTable th:nth-child(5), #adminsTable td:nth-child(5) { width: 10%; }
#adminsTable th:nth-child(6), #adminsTable td:nth-child(6) { width: 10%; }
#adminsTable th:nth-child(7), #adminsTable td:nth-child(7) { width: 8%; }
#adminsTable th:nth-child(8), #adminsTable td:nth-child(8) { width: 19%; }

/* Table column widths - Clients (8 columns) */
#clientsTable th:nth-child(1), #clientsTable td:nth-child(1) { width: 8%; }   /* Created */
#clientsTable th:nth-child(2), #clientsTable td:nth-child(2) { width: 10%; }  /* Name */
#clientsTable th:nth-child(3), #clientsTable td:nth-child(3) { width: 14%; }  /* Email */
#clientsTable th:nth-child(4), #clientsTable td:nth-child(4) { width: 10%; }  /* Mobile */
#clientsTable th:nth-child(5), #clientsTable td:nth-child(5) { width: 8%; }   /* Last Login */
#clientsTable th:nth-child(6), #clientsTable td:nth-child(6) { width: 7%; }   /* Status */
#clientsTable th:nth-child(7), #clientsTable td:nth-child(7) { width: 32%; }  /* Expiry - full width */
#clientsTable th:nth-child(8), #clientsTable td:nth-child(8) { width: 11%; }  /* Actions - slim */

/* Clients table - allow text wrap for non-badge columns */
#clientsTable td:nth-child(1),
#clientsTable td:nth-child(2),
#clientsTable td:nth-child(3),
#clientsTable td:nth-child(4),
#clientsTable td:nth-child(5) {
    white-space: normal;
    word-wrap: break-word;
}

/* Clients table - expiry column full display */
#clientsTable td:nth-child(7) {
    white-space: normal;
}

/* Clients table - badges stay on one line */
#clientsTable .status-badge,
#clientsTable .expiry-cell .badge,
#clientsTable .expiry-cell span[class*="badge"] {
    white-space: nowrap;
    display: inline-block;
}

/* Table column widths - Organizations (10 columns) */
#organizationsTable th:nth-child(1), #organizationsTable td:nth-child(1) { width: 9%; }
#organizationsTable th:nth-child(2), #organizationsTable td:nth-child(2) { width: 10%; }
#organizationsTable th:nth-child(3), #organizationsTable td:nth-child(3) { width: 12%; }
#organizationsTable th:nth-child(4), #organizationsTable td:nth-child(4) { width: 15%; }
#organizationsTable th:nth-child(5), #organizationsTable td:nth-child(5) { width: 10%; }
#organizationsTable th:nth-child(6), #organizationsTable td:nth-child(6) { width: 7%; }
#organizationsTable th:nth-child(7), #organizationsTable td:nth-child(7) { width: 8%; }
#organizationsTable th:nth-child(8), #organizationsTable td:nth-child(8) { width: 10%; }
#organizationsTable th:nth-child(9), #organizationsTable td:nth-child(9) { width: 7%; }
#organizationsTable th:nth-child(10), #organizationsTable td:nth-child(10) { width: 12%; }

/* Table column widths - Centers (7 columns) */
#centersTable th:nth-child(1), #centersTable td:nth-child(1) { width: 10%; }
#centersTable th:nth-child(2), #centersTable td:nth-child(2) { width: 8%; }
#centersTable th:nth-child(3), #centersTable td:nth-child(3) { width: 25%; }
#centersTable th:nth-child(4), #centersTable td:nth-child(4) { width: 10%; }
#centersTable th:nth-child(5), #centersTable td:nth-child(5) { width: 15%; }
#centersTable th:nth-child(6), #centersTable td:nth-child(6) { width: 10%; }
#centersTable th:nth-child(7), #centersTable td:nth-child(7) { width: 22%; }

/* Table column widths - Employees (9 columns) */
#employeesTable th:nth-child(1), #employeesTable td:nth-child(1) { width: 9%; }
#employeesTable th:nth-child(2), #employeesTable td:nth-child(2) { width: 12%; }
#employeesTable th:nth-child(3), #employeesTable td:nth-child(3) { width: 16%; }
#employeesTable th:nth-child(4), #employeesTable td:nth-child(4) { width: 11%; }
#employeesTable th:nth-child(5), #employeesTable td:nth-child(5) { width: 8%; }
#employeesTable th:nth-child(6), #employeesTable td:nth-child(6) { width: 12%; }
#employeesTable th:nth-child(7), #employeesTable td:nth-child(7) { width: 10%; }
#employeesTable th:nth-child(8), #employeesTable td:nth-child(8) { width: 7%; }
#employeesTable th:nth-child(9), #employeesTable td:nth-child(9) { width: 15%; }

/* Table column widths - Members (11 columns) */
#membersTable th:nth-child(1), #membersTable td:nth-child(1) { width: 8%; }
#membersTable th:nth-child(2), #membersTable td:nth-child(2) { width: 10%; }
#membersTable th:nth-child(3), #membersTable td:nth-child(3) { width: 14%; }
#membersTable th:nth-child(4), #membersTable td:nth-child(4) { width: 10%; }
#membersTable th:nth-child(5), #membersTable td:nth-child(5) { width: 9%; }
#membersTable th:nth-child(6), #membersTable td:nth-child(6) { width: 7%; }
#membersTable th:nth-child(7), #membersTable td:nth-child(7) { width: 8%; }
#membersTable th:nth-child(8), #membersTable td:nth-child(8) { width: 8%; }
#membersTable th:nth-child(9), #membersTable td:nth-child(9) { width: 6%; }
#membersTable th:nth-child(10), #membersTable td:nth-child(10) { width: 7%; }
#membersTable th:nth-child(11), #membersTable td:nth-child(11) { width: 13%; }

/* Subscription card amount highlight */
.sub-card-amount {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f0f0f0;
}

/* Client table - compact rows with aligned actions */
#clientsTable tbody tr {
    vertical-align: middle;
}

#clientsTable tbody td {
    vertical-align: middle;
    padding: 0.5rem 0.8rem;
}

.client-actions-cell {
    vertical-align: middle;
}

.client-actions-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-start;
}

.data-table .client-action-extra {
    display: none !important;
}

.client-row-selected {
    background: rgba(34, 197, 94, 0.15) !important;
}

.data-table .client-row-selected .client-action-extra {
    display: inline-block !important;
}

/* Client table - expiry column */
.expiry-cell {
    min-width: 120px;
}

.expiry-full-list {
    font-size: 11px;
    line-height: 1.3;
}

.status-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    display: inline-block;
    width: fit-content;
}

/* Universal badge protection - prevent truncation */
.data-table .status-badge,
.data-table span[class*="badge"] {
    white-space: nowrap;
    display: inline-block;
    width: fit-content;
    overflow: visible;
}

.status-active {
    background: #22c55e;
    color: #0a1a0d;
}

.status-inactive {
    background: #dc2626;
    color: white;
}

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

.table-card {
    background: #152619;
    border: 2px solid #22c55e;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 200px; /* Fixed height for consistent layout */
    width: 176px; /* Fixed width */
}

/* Pool Table Theme - Compact Design */
.table-card.theme-pool {
    background: transparent;
    border: none;
    padding: 0;
    position: relative;
    height: 200px;
    width: 176px;
}

.table-card.theme-pool .pool-rail {
    background: linear-gradient(145deg, #6b4532 0%, #5c3d2e 50%, #4a3025 100%);
    border-radius: 6px;
    padding: 6px;
    height: 100%;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.table-card.theme-pool .pool-felt {
    background: linear-gradient(145deg, #1a6b2e 0%, #145224 50%, #0f3d1b 100%);
    border-radius: 3px;
    height: 100%;
    padding: 6px;
    display: flex;
    flex-direction: column;
}

.table-card.theme-pool .pool-cushion {
    border: 1px solid rgba(45, 122, 74, 0.4);
    border-radius: 3px;
    height: 100%;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    text-align: center;
}

/* Pool table pockets - smaller */
.table-card.theme-pool .pocket {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle, #0a0a0a 40%, #1a1a1a 100%);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
    z-index: 5;
}

.table-card.theme-pool .pocket-tl { top: 2px; left: 2px; }
.table-card.theme-pool .pocket-tr { top: 2px; right: 2px; }
.table-card.theme-pool .pocket-bl { bottom: 2px; left: 2px; }
.table-card.theme-pool .pocket-br { bottom: 2px; right: 2px; }
.table-card.theme-pool .pocket-ml { top: 50%; left: 2px; transform: translateY(-50%); }
.table-card.theme-pool .pocket-mr { top: 50%; right: 2px; transform: translateY(-50%); }

/* Table name at top of felt area */
.table-card.theme-pool .table-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #86efac;
    text-align: center;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Pool theme hover effects */
.table-card.theme-pool:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(74, 222, 128, 0.3);
}

/* Pool theme hover outline */
.table-card.theme-pool .hover-outline {
    position: absolute;
    inset: 0;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
    pointer-events: none;
    z-index: 10;
}

.table-card.theme-pool:hover .hover-outline {
    border-color: rgba(74, 222, 128, 0.6);
}

/* Pool theme timer */
.table-card.theme-pool .table-timer {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 2px;
    margin-top: 8px; /* Push timer down from top */
    flex-shrink: 0;
}

/* Pool theme status */
.table-card.theme-pool .table-status {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #a7f3d0;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Pool theme operation buttons */
.table-card.theme-pool .table-operations {
    display: flex;
    gap: 3px;
    margin-top: auto;
    flex-shrink: 0;
}

.table-card.theme-pool .table-operations button {
    flex: 1;
    padding: 4px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.table-card.theme-pool .table-operations button:hover {
    filter: brightness(1.1);
}

/* Pool theme status indicator - colored left border on cushion */
.table-card.theme-pool.available .pool-cushion {
    border-left: 3px solid #22c55e;
}

.table-card.theme-pool.occupied .pool-cushion {
    border-left: 3px solid #f97316;
}

.table-card.theme-pool.checkedout .pool-cushion {
    border-left: 3px solid #dc2626;
}

.table-card.theme-pool.maintenance .pool-cushion,
.table-card.theme-pool.inactive .pool-cushion {
    border-left: 3px solid #6b7280;
}

/* Pool theme status text colors */
.table-card.theme-pool.available .table-status { color: #86efac; }
.table-card.theme-pool.occupied .table-status { color: #fed7aa; }
.table-card.theme-pool.checkedout .table-status { color: #fecaca; }
.table-card.theme-pool.maintenance .table-status,
.table-card.theme-pool.inactive .table-status { color: #d1d5db; }

/* Pool Table Square Theme */
.table-card.theme-pool-square {
    background: transparent;
    border: none;
    padding: 0;
    height: 200px;
    width: 176px;
    display: flex;
    flex-direction: column;
}

.table-card.theme-pool-square .table-title-container {
    padding: 4px 8px;
    margin-bottom: 4px;
    border-radius: 4px;
    border: 2px solid;
    background: rgba(0, 0, 0, 0.4);
    text-align: center;
    flex-shrink: 0;
}

.table-card.theme-pool-square .table-name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-card.theme-pool-square .pool-felt-square {
    flex: 1;
    border-radius: 4px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.table-card.theme-pool-square .table-timer {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 2px;
    margin-top: 8px; /* Push timer down from top */
}

.table-card.theme-pool-square .table-status {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-card.theme-pool-square .table-operations {
    display: flex;
    gap: 3px;
    margin-top: auto;
    flex-shrink: 0;
}

.table-card.theme-pool-square .table-operations button {
    flex: 1;
    padding: 4px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.table-card.theme-pool-square .table-operations button:hover {
    filter: brightness(1.1);
}

.table-card.theme-pool-square:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(74, 222, 128, 0.3);
}

/* Pool-square theme status indicator - colored left border on felt */
.table-card.theme-pool-square.available .pool-felt-square {
    border-left: 3px solid #22c55e;
}

.table-card.theme-pool-square.occupied .pool-felt-square {
    border-left: 3px solid #f97316;
}

.table-card.theme-pool-square.checkedout .pool-felt-square {
    border-left: 3px solid #dc2626;
}

.table-card.theme-pool-square.maintenance .pool-felt-square,
.table-card.theme-pool-square.inactive .pool-felt-square {
    border-left: 3px solid #6b7280;
}

/* ========================================
   SNOOKER TABLE THEME - Exact Design-6.txt
   Card IS the rail (no separate rail div)
   ======================================== */

/* Snooker ball roll animation */
@keyframes snookerBallRoll {
    0% { transform: translateX(-50%) rotate(0deg); }
    25% { transform: translateX(-45%) rotate(20deg); }
    50% { transform: translateX(-55%) rotate(-15deg); }
    75% { transform: translateX(-48%) rotate(8deg); }
    100% { transform: translateX(-50%) rotate(0deg); }
}

/* Base snooker theme card - Card IS the rail (like Design-6.txt) */
.table-card.theme-snooker {
    /* rail-wood from Design-6.txt */
    background: linear-gradient(145deg, #6b4532 0%, #5c3d2e 50%, #4a3025 100%);
    border: none;
    border-radius: 8px; /* rounded-lg */
    padding: 12px; /* p-3 */
    width: 176px; /* w-44 */
    height: 240px; /* Fixed height for consistent layout */
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); /* shadow-lg */
    transition: all 0.3s ease;
    margin-top: 20px; /* Space for ball badge */
}

/* Ball badge - snooker ball style at top */
.table-card.theme-snooker .ball-badge {
    position: absolute;
    top: -16px; /* -top-4 */
    left: 50%;
    transform: translateX(-50%);
    min-width: 32px; /* w-8 */
    height: 32px; /* h-8 */
    padding: 0 10px; /* px-2.5 */
    border-radius: 9999px; /* rounded-full */
    background: radial-gradient(circle at 35% 35%, #f87171 0%, #dc2626 30%, #b91c1c 60%, #7f1d1d 100%);
    box-shadow:
        inset -2px -2px 5px rgba(0, 0, 0, 0.4),
        inset 2px 2px 3px rgba(255, 255, 255, 0.15),
        0 2px 5px rgba(0, 0, 0, 0.4);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.3s ease; /* Only transition box-shadow, not transform */
}

/* Ball badge pill shape for longer names */
.table-card.theme-snooker .ball-badge.pill {
    border-radius: 9999px;
}

/* Ball badge text */
.table-card.theme-snooker .ball-badge span {
    color: white;
    font-size: 0.75rem; /* text-xs */
    font-weight: 700; /* font-bold */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); /* drop-shadow */
    white-space: nowrap;
}

/* Ball animation on hover */
.table-card.theme-snooker:hover .ball-badge {
    animation: snookerBallRoll 0.5s ease-out;
    box-shadow:
        inset -2px -2px 5px rgba(0, 0, 0, 0.4),
        inset 2px 2px 3px rgba(255, 255, 255, 0.15),
        0 3px 6px rgba(0, 0, 0, 0.5),
        0 0 12px rgba(239, 68, 68, 0.6);
}

/* Corner pockets - positioned on the card (rail) */
.table-card.theme-snooker .snooker-pocket {
    position: absolute;
    width: 16px; /* w-4 */
    height: 16px; /* h-4 */
    border-radius: 9999px; /* rounded-full */
    background: radial-gradient(circle, #0a0a0a 40%, #1a1a1a 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8); /* shadow-inner */
    z-index: 5;
}

/* Pocket positions: top-1 = 4px, left-1 = 4px */
.table-card.theme-snooker .snooker-pocket-tl { top: 4px; left: 4px; }
.table-card.theme-snooker .snooker-pocket-tr { top: 4px; right: 4px; }
.table-card.theme-snooker .snooker-pocket-bl { bottom: 4px; left: 4px; }
.table-card.theme-snooker .snooker-pocket-br { bottom: 4px; right: 4px; }
.table-card.theme-snooker .snooker-pocket-ml { top: 50%; left: 4px; transform: translateY(-50%); }
.table-card.theme-snooker .snooker-pocket-mr { top: 50%; right: 4px; transform: translateY(-50%); }

/* Felt surface - background set via inline style from surfaceStyles */
.table-card.theme-snooker .snooker-felt {
    border-radius: 4px; /* rounded */
    padding: 12px; /* p-3 */
    height: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Hover outline effect */
.table-card.theme-snooker .hover-outline {
    position: absolute;
    inset: 0;
    border-radius: 8px; /* rounded-lg */
    border: 1px solid transparent;
    transition: border-color 0.2s ease;
    pointer-events: none;
    z-index: 10;
}

.table-card.theme-snooker:hover {
    transform: translateY(-2px); /* hover:-translate-y-0.5 */
    box-shadow: 0 10px 25px -5px rgba(74, 222, 128, 0.3);
}

.table-card.theme-snooker:hover .hover-outline {
    border-color: rgba(74, 222, 128, 0.6);
}

/* Timer display - text-2xl mb-2 from Design-6.txt */
.table-card.theme-snooker .table-timer {
    font-family: 'Courier New', monospace; /* font-mono */
    font-size: 1.5rem; /* text-2xl */
    font-weight: 700;
    color: white;
    margin-bottom: 8px; /* mb-2 */
    margin-top: 12px; /* Push timer down from top */
    flex-shrink: 0;
}

/* Status text - text-xs uppercase tracking-wide - fixed 2-line height */
.table-card.theme-snooker .table-status {
    font-size: 0.75rem; /* text-xs */
    text-transform: uppercase;
    color: #bbf7d0; /* text-green-200 */
    letter-spacing: 0.05em; /* tracking-wide */
    margin-bottom: 0;
    flex-shrink: 0;
    line-height: 1.4;
    min-height: 2.8em; /* Always reserve 2 lines space */
    max-height: 2.8em;
    overflow: hidden;
}

/* Flexible spacer - pushes buttons to bottom */
.table-card.theme-snooker .table-spacer {
    flex-grow: 1;
    min-height: 8px;
}

/* Placeholder for empty button row - maintains 2-row height */
.table-card.theme-snooker .btn-placeholder {
    height: 26px;  /* Match button height */
    flex-shrink: 0;
}

/* Operation buttons */
.table-card.theme-snooker .table-operations {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 0;
    flex-shrink: 0;
}

.table-card.theme-snooker .table-operations button {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.table-card.theme-snooker .table-operations button:hover {
    filter: brightness(1.1);
}

/* Status text colors - no border-left, ball badge uses table type color */
.table-card.theme-snooker.available .table-status { color: #86efac; }
.table-card.theme-snooker.occupied .table-status { color: #fed7aa; }
.table-card.theme-snooker.checkedout .table-status { color: #fecaca; }
.table-card.theme-snooker.maintenance .table-status,
.table-card.theme-snooker.inactive .table-status { color: #d1d5db; }

/* ========================================
   SNOOKER SQUARE THEME - Exact Design-6.txt
   Card IS the rail (w-44 aspect-square)
   ======================================== */

/* Base snooker-square theme card - Card IS the rail */
.table-card.theme-snooker-square {
    /* rail-wood from Design-6.txt */
    background: linear-gradient(145deg, #6b4532 0%, #5c3d2e 50%, #4a3025 100%);
    border: none;
    border-radius: 8px; /* rounded-lg */
    padding: 12px; /* p-3 */
    width: 176px; /* w-44 */
    height: 176px; /* aspect-square */
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); /* shadow-lg */
    transition: all 0.3s ease;
    margin-top: 20px; /* Space for ball badge */
}

/* Ball badge for square theme */
.table-card.theme-snooker-square .ball-badge {
    position: absolute;
    top: -16px; /* -top-4 */
    left: 50%;
    transform: translateX(-50%);
    min-width: 32px; /* w-8 */
    height: 32px; /* h-8 */
    padding: 0 10px; /* px-2.5 */
    border-radius: 9999px; /* rounded-full */
    background: radial-gradient(circle at 35% 35%, #f87171 0%, #dc2626 30%, #b91c1c 60%, #7f1d1d 100%);
    box-shadow:
        inset -2px -2px 5px rgba(0, 0, 0, 0.4),
        inset 2px 2px 3px rgba(255, 255, 255, 0.15),
        0 2px 5px rgba(0, 0, 0, 0.4);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.3s ease; /* Only transition box-shadow, not transform */
}

.table-card.theme-snooker-square .ball-badge.pill {
    border-radius: 9999px;
}

.table-card.theme-snooker-square .ball-badge span {
    color: white;
    font-size: 0.75rem; /* text-xs */
    font-weight: 700; /* font-bold */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.table-card.theme-snooker-square:hover .ball-badge {
    animation: snookerBallRoll 0.5s ease-out;
    box-shadow:
        inset -2px -2px 5px rgba(0, 0, 0, 0.4),
        inset 2px 2px 3px rgba(255, 255, 255, 0.15),
        0 3px 6px rgba(0, 0, 0, 0.5),
        0 0 12px rgba(239, 68, 68, 0.6);
}

/* Only corner pockets for square - positioned on card (rail) */
.table-card.theme-snooker-square .snooker-pocket {
    position: absolute;
    width: 16px; /* w-4 */
    height: 16px; /* h-4 */
    border-radius: 9999px; /* rounded-full */
    background: radial-gradient(circle, #0a0a0a 40%, #1a1a1a 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 5;
}

.table-card.theme-snooker-square .snooker-pocket-tl { top: 4px; left: 4px; }
.table-card.theme-snooker-square .snooker-pocket-tr { top: 4px; right: 4px; }
.table-card.theme-snooker-square .snooker-pocket-bl { bottom: 4px; left: 4px; }
.table-card.theme-snooker-square .snooker-pocket-br { bottom: 4px; right: 4px; }

/* Felt surface for square - p-3 h-full - background set via inline style */
.table-card.theme-snooker-square .snooker-felt {
    border-radius: 4px; /* rounded */
    padding: 12px; /* p-3 */
    height: 100%; /* h-full */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: center;
}

/* Hover outline for square */
.table-card.theme-snooker-square .hover-outline {
    position: absolute;
    inset: 0;
    border-radius: 8px; /* rounded-lg */
    border: 1px solid transparent;
    transition: border-color 0.2s ease;
    pointer-events: none;
    z-index: 10;
}

.table-card.theme-snooker-square:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(74, 222, 128, 0.3);
}

.table-card.theme-snooker-square:hover .hover-outline {
    border-color: rgba(74, 222, 128, 0.6);
}

/* Timer for square - text-xl mb-1 */
.table-card.theme-snooker-square .table-timer {
    font-family: 'Courier New', monospace; /* font-mono */
    font-size: 1.25rem; /* text-xl */
    font-weight: 700;
    color: white;
    margin-bottom: 4px; /* mb-1 */
    margin-top: 10px; /* Push timer down from top */
    flex-shrink: 0;
}

/* Status for square - text-xs uppercase tracking-wide - fixed 2-line height */
.table-card.theme-snooker-square .table-status {
    font-size: 0.75rem; /* text-xs */
    text-transform: uppercase;
    color: #bbf7d0; /* text-green-200 */
    letter-spacing: 0.05em; /* tracking-wide */
    margin-bottom: 0;
    flex-shrink: 0;
    line-height: 1.4;
    min-height: 2.8em; /* Always reserve 2 lines space */
    max-height: 2.8em;
    overflow: hidden;
}

/* Flexible spacer for square - pushes buttons to bottom */
.table-card.theme-snooker-square .table-spacer {
    flex-grow: 1;
    min-height: 4px;
}

/* Placeholder for empty button row in square theme */
.table-card.theme-snooker-square .btn-placeholder {
    height: 22px;  /* Match button height for square */
    flex-shrink: 0;
}

/* Operation buttons for square - flex-row gap-1 justify-center */
.table-card.theme-snooker-square .table-operations {
    display: flex;
    flex-direction: row;
    gap: 4px; /* gap-1 */
    justify-content: center;
    flex-shrink: 0;
}

.table-card.theme-snooker-square .table-operations button {
    padding: 4px 8px; /* px-2 py-1 */
    border-radius: 4px; /* rounded */
    font-size: 0.75rem; /* text-xs */
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.table-card.theme-snooker-square .table-operations button:hover {
    filter: brightness(1.1);
}

/* Status text colors for square - no border-left, ball badge uses table type color */
.table-card.theme-snooker-square.available .table-status { color: #86efac; }
.table-card.theme-snooker-square.occupied .table-status { color: #fed7aa; }
.table-card.theme-snooker-square.checkedout .table-status { color: #fecaca; }
.table-card.theme-snooker-square.maintenance .table-status,
.table-card.theme-snooker-square.inactive .table-status { color: #d1d5db; }

/* End Snooker Themes */

.table-card.available {
    border-color: #22c55e;
}

.table-card.occupied {
    border-color: #f97316;
}

.table-card.loading {
    border-color: #6b7280;
    opacity: 0.8;
    pointer-events: none;
}

.table-card.loading .table-timer {
    color: #6b7280;
}

.table-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.table-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: #22c55e;
    margin-bottom: 0;
}

.table-timer {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    color: #22c55e;
}

.table-status {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #d0d0d0;
    font-weight: 500;
}

/* Animation for table card updates */
@keyframes tableUpdate {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.fab-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 50;
}

.fab {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #22c55e;
    color: #0a1a0d;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab:hover {
    transform: scale(1.1);
}

.fab-blue {
    background: #3b82f6;
    color: white;
    display: none; /* Hide by default */
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000 !important;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

/* Ensure modal uses flex display when shown */
.modal[style*="block"], .modal[style*="flex"] {
    display: flex !important;
}

/* Modals with Tabs - Full height with margin for consistent sizing */
#splitBillGameModal .modal-content,
#viewCountingUpTableModal .modal-content,
#viewCountingDownTableModal .modal-content,
#settingsModal .modal-content,
#transactionModal .modal-content,
#couponsModal .modal-content {
    height: calc(100vh - 40px);
    margin: 20px auto;
}

#splitBillGameModal .modal-body,
#viewCountingUpTableModal .modal-body,
#viewCountingDownTableModal .modal-body,
#settingsModal .modal-body,
#transactionModal .modal-body,
#couponsModal .modal-body {
    flex: 1;
    overflow-y: auto;
}

.modal-content {
    background: #152619;
    margin: 1rem auto;
    border-radius: 8px;
    max-width: 95vw;
    width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    border: 1px solid #22c55e;
    display: flex;
    flex-direction: column;
}

.modal-content.has-sticky-tabs .modal-header {
    border-bottom: none;
    padding-bottom: 1rem;
}

.modal-content.has-sticky-tabs .modal-body {
    padding-top: 0;
}

.modal-content.has-sticky-tabs .tabs {
    position: sticky;
    top: 0;
    background: #152619;
    z-index: 10;
    border-bottom: 1px solid #22c55e;
    margin: 0;
    padding: 8px 1rem;
    margin-top: 0;
}

.modal-content .tabs {
    position: sticky;
    top: 0;
    background: #152619;
    z-index: 10;
    border-bottom: 1px solid #22c55e;
    margin: 0;
    padding: 8px 1rem;
    border-top: 1px solid #22c55e;
}

.modal-content-large {
    width: 1000px !important;
    max-height: 85vh;
}

.modal-header {
    padding: 1rem;
    border-bottom: 1px solid #22c55e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a2f1e;
}

.modal-header h3 {
    color: #22c55e;
    font-size: 1.2rem;
    font-weight: 600;
}

.close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #d0d0d0;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.close:hover {
    color: #ef4444;
}

.modal-body {
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden !important;
    /* Removed position:fixed/width/height - they break sticky positioning and cause layout shift */
}

.modal-content.has-sticky-tabs .modal-body {
    padding: 0 1rem 1rem 1rem;
    overflow-y: auto;
}

.modal-content.has-sticky-tabs .tab-content {
    padding-top: 1rem;
}

.modal-footer {
    padding: 1rem;
    border-top: 1px solid #22c55e;
    background: #1a2f1e;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-wrap: nowrap;
    row-gap: 0.8rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: #f0f0f0;
    font-size: 0.85rem;
    font-weight: 500;
}

.pos-content {
    display: grid;
    grid-template-columns: 140px 1fr 220px;
    gap: 1rem;
    height: 400px;
}

.pos-categories {
    background: #1a2f1e;
    border-radius: 6px;
    padding: 0.8rem;
    overflow-y: auto;
    border: 1px solid #22c55e;
}

.category-btn {
    width: 100%;
    padding: 0.6rem;
    margin-bottom: 0.4rem;
    background: #152619;
    border: none;
    color: #f0f0f0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.category-btn:hover,
.category-btn.active {
    background: #22c55e;
    color: #0a1a0d;
}

.pos-items {
    background: #1a2f1e;
    border-radius: 6px;
    padding: 0.8rem;
    overflow-y: auto;
    border: 1px solid #22c55e;
}

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

.item-card {
    background: #152619;
    border: 1px solid #22c55e;
    border-radius: 6px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
}

.item-card:hover {
    background: #22c55e;
    color: #0a1a0d;
}

.pos-invoice {
    background: #1a2f1e;
    border-radius: 6px;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    border: 1px solid #22c55e;
}

.invoice-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 0.8rem;
}

.invoice-item {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(34, 197, 94, 0.2);
    font-size: 0.8rem;
}

.invoice-total {
    padding: 0.8rem 0;
    border-top: 2px solid #22c55e;
    font-size: 0.9rem;
    font-weight: 600;
    color: #22c55e;
    text-align: center;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #22c55e;
    margin-bottom: 1rem;
    gap: 0.2rem;
    overflow-x: auto;
}

.tab-btn {
    padding: 0.6rem 0.8rem;
    background: none;
    border: none;
    color: #d0d0d0;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.tab-btn:hover,
.tab-btn.active {
    color: #22c55e;
    border-bottom-color: #22c55e;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.page-content {
    display: none;
}

.page-content.active {
    display: block;
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 0.8rem;
        gap: 0.8rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.3rem;
    }
    
    .nav-links a {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .filters-container {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0 0.8rem;
    }
    
    .container {
        padding: 0.8rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .card-header {
        flex-direction: column;
        gap: 0.8rem;
        align-items: stretch;
    }
    
    .tables-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.8rem;
    }
    
.pos-content {
    display: grid;
    grid-template-columns: 140px 1fr 220px;
    gap: 1rem;
    height: 600px;
}
    
    .data-table {
        font-size: 0.75rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
    
    .fab {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .modal-content {
        margin: 0.5rem auto;
        max-width: 98vw;
        width: 95vw;
        max-height: 95vh;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.6rem;
    }

    .modal-footer {
        gap: 0.8rem;
        row-gap: 0.6rem;
        flex-wrap: nowrap !important;
    }
    
    .modal-footer > div {
        gap: 0.8rem;
        justify-content: center;
        flex-wrap: nowrap !important;
    }
    
    .modal-footer .btn {
        min-width: 100px;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

 .data-table .btn-sm {
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
        min-width: 50px;
    }
    
    .data-table td:last-child > div {
        gap: 0.3rem !important;
    }
    
    .data-table td:last-child {
        padding: 0.8rem 0.5rem;
    }


}

@media (max-width: 480px) {
    .nav-links a {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.4rem;
        font-size: 0.7rem;
    }
    
    .table-card {
        padding: 0.8rem;
    }
    
    .table-number {
        font-size: 1rem;
    }
    
    .table-timer {
        font-size: 1.1rem;
    }
}

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

::-webkit-scrollbar-track {
    background: #0a1a0d;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #22c55e;
    border-radius: 4px;
    border: 1px solid #152619;
}

::-webkit-scrollbar-thumb:hover {
    background: #16a34a;
}

::-webkit-scrollbar-corner {
    background: #0a1a0d;
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #22c55e #0a1a0d;
}


.tabs {
    display: flex;
    border-bottom: 1px solid #22c55e;
    margin-bottom: 1rem;
    gap: 0.2rem;
    overflow-x: auto;
    align-items: center;
}

.table-card.maintenance {
    border-color: #f97316;
}

.table-card.inactive {
    border-color: #6b7280;
    opacity: 0.6;
}

.table-card.maintenance .table-timer,
.table-card.inactive .table-timer {
    color: #f97316;
    font-size: 0.9rem;
}

.pos-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(34, 197, 94, 0.2);
    font-size: 0.85rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.3rem;
}

.quantity-btn {
    background: none;
    border: 1px solid #22c55e;
    color: #22c55e;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: rgba(34, 197, 94, 0.1);
}

.remove-btn {
    border-color: #dc2626;
    color: #dc2626;
}

.remove-btn:hover {
    background: rgba(220, 38, 38, 0.1);
}

.items-tab-content {
    min-height: 400px;
}

.stock-warning {
    color: #dc2626 !important;
    font-weight: 600;
}

.stock-ok {
    color: #22c55e !important;
}

.payment-method-btn {
    background: #1a2f1e;
    border: 2px solid #6b7280;
    border-radius: 6px;
    padding: 0.8rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #f0f0f0;
    font-size: 0.85rem;
    font-weight: 500;
}

.payment-method-btn:hover {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.payment-method-btn.selected {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.payment-method-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #dc2626;
}

.payment-method-btn:disabled:hover {
    border-color: #dc2626;
    background: #1a2f1e;
}


.modal-footer > div {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.modal-footer .btn {
    min-width: 120px;
    white-space: nowrap;
}


/* Invoice Preview Styles */
.invoice-preview {
    background: white;
    color: black;
    border: 1px solid #ddd;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.invoice-preview-80mm {
    width: 80mm;
    max-width: 80mm;
    font-size: 11px;
    line-height: 1.2;
    margin: 0 auto;
}

.invoice-preview-58mm {
    width: 58mm;
    max-width: 58mm;
    font-size: 9px;
    line-height: 1.1;
    margin: 0 auto;
}

.invoice-preview-a4 {
    width: 210mm;
    max-width: 500px;
    font-size: 12px;
    line-height: 1.4;
    margin: 0 auto;
}

.invoice-header {
    text-align: center;
    border-bottom: 2px solid #000;
    padding: 8px;
    margin-bottom: 10px;
}

.invoice-business-name {
    font-weight: bold;
    font-size: 1.3em;
    margin-bottom: 4px;
}

.invoice-info-section {
    margin-bottom: 10px;
    font-size: 0.95em;
}

.invoice-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
    padding: 0 8px;
}

.invoice-items-section {
    border-top: 1px solid #000;
    padding-top: 8px;
    margin: 10px 0;
}

.invoice-item-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
    padding: 0 8px;
    font-size: 0.9em;
}

.invoice-totals-section {
    border-top: 2px solid #000;
    padding-top: 8px;
    margin-top: 10px;
}

.invoice-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
    padding: 0 8px;
    font-size: 0.9em;
}

.invoice-final-total {
    border-top: 2px solid #000;
    padding-top: 4px;
    font-weight: bold;
    font-size: 1.1em;
}

.invoice-footer {
    text-align: center;
    margin-top: 15px;
    padding-top: 8px;
    border-top: 1px solid #000;
    font-size: 0.8em;
    padding: 8px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

#invoiceDisplayContainer {
    scrollbar-width: thin;
    scrollbar-color: #22c55e #1a2f1e;
}

#invoiceDisplayContainer::-webkit-scrollbar {
    width: 8px;
}

#invoiceDisplayContainer::-webkit-scrollbar-track {
    background: #1a2f1e;
    border-radius: 4px;
}

#invoiceDisplayContainer::-webkit-scrollbar-thumb {
    background: #22c55e;
    border-radius: 4px;
}

#invoiceDisplayContainer .header {
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

#invoiceDisplayContainer .final-total {
    border-top: 2px solid #000;
    padding-top: 5px;
    font-weight: bold;
    font-size: 14px;
}

.items-subtabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    background: #1a2f1e;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #22c55e;
}

.items-subtab-btn {
    background: #0f1f12;
    border: 2px solid #2a4d2e;
    border-radius: 8px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #d0d0d0;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.items-subtab-btn:hover {
    border-color: #22c55e;
    background: #152619;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.items-subtab-btn.active {
    border-color: #22c55e;
    background: linear-gradient(135deg, #152619 0%, #1a2f1e 100%);
    color: #22c55e;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3);
}

.items-subtab-btn.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.subtab-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    filter: grayscale(1);
    transition: filter 0.3s ease;
}

.items-subtab-btn:hover .subtab-icon,
.items-subtab-btn.active .subtab-icon {
    filter: grayscale(0);
}

.subtab-label {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.items-subtab-btn.active .subtab-label {
    color: #22c55e;
}

.subtab-description {
    font-size: 0.8rem;
    color: #9ca3af;
    line-height: 1.2;
}

.items-subtab-btn.active .subtab-description {
    color: #d0d0d0;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .items-subtabs {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .items-subtab-btn {
        min-height: 80px;
        padding: 1rem;
        flex-direction: row;
        text-align: left;
    }
    
    .subtab-icon {
        font-size: 1.5rem;
        margin-bottom: 0;
        margin-right: 1rem;
    }
    
    .subtab-label {
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }
    
    .subtab-description {
        font-size: 0.75rem;
    }
}

/* Animation for tab content switching */
.tab-content {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.tab-content.active {
    opacity: 1;
    transform: translateY(0);
}

.stats-card {
    background: #1a2f1e;
    border: 1px solid #22c55e;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.stats-label {
    color: #d0d0d0;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.stats-value {
    color: #22c55e;
    font-size: 1.5rem;
    font-weight: 700;
}

.member-credit-balance {
    transition: background-color 0.3s ease;
}

.credit-deduction-highlight {
    background-color: #fef3c7 !important;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.table-timer.pay-status {
    background-color: #fee2e2;
    color: #dc2626;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    animation: blink 1s infinite;
}

.table-card.checkedout {
    background: #7c2d12;
    border-color: #dc2626 !important;
}

.table-card.checkedout .table-timer {
    color: #dc2626 !important;
    font-weight: bold;
    animation: blink 1s infinite;
}

/* Danger Zone Styling */
.danger-zone {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #374151;
    text-align: center;
}

.danger-zone h3 {
    color: #ef4444;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.danger-zone p {
    color: #d0d0d0;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.danger-zone .btn-danger {
    background: #dc2626;
    border: 1px solid #dc2626;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.danger-zone .btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    transform: translateY(-1px);
}

/* Enhanced modal styles for new 6-modal system */
.modal-content-large {
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
}

.has-sticky-tabs {
    position: relative;
}

.has-sticky-tabs .tabs {
    position: sticky;
    top: 0;
    background: #0a0a0a;
    z-index: 10;
    border-bottom: 1px solid #22c55e;
    padding: 0 0 10px 0;
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #22c55e;
    padding-bottom: 0.5rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid #6b7280;
    color: #d0d0d0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.tab-btn:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: #22c55e;
}

.tab-btn.active {
    background: #22c55e;
    border-color: #22c55e;
    color: #0a0a0a;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.payment-method-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: #1a2f1e;
    border: 2px solid #6b7280;
    border-radius: 8px;
    color: #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 80px;
}

.payment-method-btn:hover {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.payment-method-btn.selected {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.package-selection-card {
    border: 2px solid #6b7280;
    border-radius: 6px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #1a2f1e;
}

.package-selection-card:hover {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

.package-selection-card.selected {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

/* Responsive design for modals */
@media (max-width: 768px) {
    .modal-content-large {
        width: 95%;
        max-height: 95vh;
    }
    
    .tabs {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .tab-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .payment-method-btn {
        min-height: 60px;
        padding: 0.5rem;
    }
}

/* Enhanced form styling for new modals */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #22c55e;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    background: #1a2f1e;
    color: #f0f0f0;
    border: 1px solid #6b7280;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.form-input:readonly {
    background: #111827;
    color: #9ca3af;
    cursor: not-allowed;
}

/* Button styling consistency */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-success {
    background: #22c55e;
    color: white;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-info {
    background: #0891b2;
    color: white;
}

.btn-info:hover {
    background: #0e7490;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.btn:disabled {
    background: #374151;
    color: #9ca3af;
    cursor: not-allowed;
}

.btn:disabled:hover {
    background: #374151;
}


/* Reset any default margins/padding that might interfere */
.login-page {
    margin: 0 !important;
    padding: 0 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
}

/* Input focus effects */
.login-input:focus {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15) !important;
    outline: none !important;
    background: rgba(15, 15, 15, 0.95) !important;
    transform: translateY(-1px);
}

.login-input::placeholder {
    color: #aaa !important;
    font-weight: 400;
}

/* Button hover effects */
.login-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.4);
}

.login-submit-btn:active {
    transform: translateY(0);
}

.login-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Card hover effect */
.login-page .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 100px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(34, 197, 94, 0.2) !important;
}

.login-page .card:hover img {
    transform: scale(1.08) rotate(5deg);
}

/* VYROX AI link hover */
.login-page a[href*="vyrox.com"]:hover {
    color: #86efac !important;
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    transform: translateY(-1px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

/* Responsive design */
@media (max-width: 768px) {
    .login-container {
        padding: 1.5rem !important;
    }
    
    .login-page .card-header {
        padding: 0rem 0rem 0rem !important;
    }
    
    .login-page .card-body {
        padding: 1.5rem !important;
    }
    
    .login-page h1 {
        font-size: 1.7rem !important;
    }
    
    .login-page p {
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 1rem !important;
    }
    
    .login-page h1 {
        font-size: 1.5rem !important;
    }
    
    .login-page p {
        font-size: 0.9rem !important;
    }
}


/* Vanity mode filter styling */
.vanity-mode-filter {
    background: rgba(34, 197, 94, 0.1) !important;
    border: 2px solid #22c55e !important;
    position: relative;
}

.vanity-mode-filter::after {
    content: "🔒";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #22c55e;
    font-size: 0.8rem;
}

.vanity-indicator {
    animation: vanityFadeIn 0.5s ease-in-out;
}

@keyframes vanityFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive vanity indicator */
@media (max-width: 768px) {
    .vanity-indicator {
        font-size: 0.75rem !important;
        padding: 6px 12px !important;
    }
    
    .vanity-indicator span:first-child {
        display: none;
    }
}

/* WeChat-style Login Loader Styles */
.wechat-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

.wechat-loader-box {
    width: 120px;
    height: 120px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s ease-out;
}

.wechat-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid #07C160;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.wechat-loader-text {
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    font-weight: 400;
    text-align: center;
    letter-spacing: 0.5px;
}

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

@keyframes scaleIn {
    from { 
        opacity: 0;
        transform: scale(0.8);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Disabled button state */
#loginBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}


.btn-info {
    background-color: #3b82f6;
    border: 1px solid #3b82f6;
    color: white;
}

.btn-info:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

#qrCodeContainer img {
    max-width: 100%;
    height: auto;
}

   /* Fix bouncing / scroll stability on iOS */
    #memberPortal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow: hidden;
        overscroll-behavior: none;
        -webkit-overflow-scrolling: touch;
    }

   /* Prevent double-tap zoom on mobile devices */
    #memberPortal * {
        touch-action: manipulation !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        -khtml-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
        user-select: none !important;
    }
    
    /* Allow text selection for input fields */
    #memberPortal input, #memberPortal textarea {
        -webkit-user-select: text !important;
        -khtml-user-select: text !important;
        -moz-user-select: text !important;
        -ms-user-select: text !important;
        user-select: text !important;
    }
    
    /* Prevent text selection highlighting */
    #memberPortal *::selection {
        background: transparent;
    }
    
    #memberPortal *::-moz-selection {
        background: transparent;
    }
    
    /* Prevent image dragging */
    #memberPortal img {
        -webkit-user-drag: none !important;
        -khtml-user-drag: none !important;
        -moz-user-drag: none !important;
        -o-user-drag: none !important;
        user-drag: none !important;
    }
    
    /* Disable text selection on buttons */
    #memberPortal button {
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        -khtml-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
        user-select: none !important;
    }

/* Add this CSS to make disabled input text color match disabled select text color */
.form-input:disabled {
    color: #6c757d !important; /* Same grey color as disabled select */
}

select.form-input:disabled {
    color: #6c757d !important; /* Ensure select also has consistent grey text */
}

#revenues > div.container > div.filters-container
{
margin-bottom: 1.5rem;
}


/* User Dropdown Styles */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-dropdown-toggle {
    background: none;
    border: none;
    color: #f0f0f0;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.user-dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #1a2f1e;
    border: 1px solid #22c55e;
    border-radius: 6px;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    padding: 0.5rem 0;
    margin-top: 0.25rem;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #f0f0f0;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background-color 0.2s ease;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.user-dropdown-item:hover {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.dropdown-icon {
    font-size: 1rem;
    width: 16px;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .user-dropdown-menu {
        right: -1rem;
        min-width: 160px;
    }
    
    .user-dropdown-toggle {
        font-size: 0.8rem;
        padding: 0.4rem;
    }
    
    .user-dropdown-item {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* User dropdown styles */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-dropdown-toggle {
    background: none;
    border: none;
    color: #f0f0f0;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-family: inherit;
}

.user-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.user-dropdown.active .user-dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    background: #1a2f1e;
    border: 1px solid #22c55e;
    border-radius: 4px;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    z-index: 10000;
}

.user-dropdown.active .user-dropdown-menu {
    display: block;
}

.user-dropdown-item {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    color: #f0f0f0;
    text-decoration: none;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 0.9rem;
}

.user-dropdown-item:hover {
    background: rgba(34, 197, 94, 0.1);
    color: #f0f0f0;
    text-decoration: none;
}

.user-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

/* Real-time table update animations */
@keyframes tableStatusUpdate {
    0% { 
        transform: scale(1); 
        box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
    }
    25% { 
        transform: scale(1.02); 
        box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3); 
    }
    75% { 
        transform: scale(1.01); 
        box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4); 
    }
    100% { 
        transform: scale(1); 
        box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
    }
}

/* Member name column styles */
.member-name-container {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.member-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gender-icon {
    font-size: 1rem;
    cursor: help;
    transition: opacity 0.2s ease;
    position: relative;
    z-index: 1000;
    pointer-events: auto !important;
    user-select: none;
}

.gender-icon:hover {
    opacity: 0.7;
}

.age-badge {
    font-size: 0.75rem;
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(34, 197, 94, 0.3);
    cursor: help;
    display: inline-block;
    font-weight: 500;
    position: relative;
    z-index: 1000;
    pointer-events: auto !important;
    user-select: none;
}

.age-badge:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
}

/* Ensure member name container allows tooltips to show */
.member-name-container {
    position: relative;
    z-index: 1;
}

.member-name-row {
    position: relative;
    z-index: 1;
}

/* Allow tooltips to show outside table cells */
.data-table td:has(.gender-icon), 
.data-table td:has(.age-badge) {
    overflow: visible !important;
    position: relative;
}

/* Fallback for browsers that don't support :has() */
.data-table td .member-name-container {
    overflow: visible;
}

/* Custom CSS tooltips as fallback */
.gender-icon::before,
.age-badge::before {
    content: attr(title);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a2f1e;
    color: #f0f0f0;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    border: 1px solid #22c55e;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.gender-icon::after,
.age-badge::after {
    content: '';
    position: absolute;
    bottom: 112%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #22c55e;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.gender-icon:hover::before,
.gender-icon:hover::after,
.age-badge:hover::before,
.age-badge:hover::after {
    opacity: 1;
}




/* ====================
   ANNOUNCEMENT SYSTEM STYLES
   ==================== */

/* Active Organizations Panel */
.active-orgs-panel {
    background: rgba(34, 197, 94, 0.08);
    border: 2px solid #22c55e;
    border-radius: 8px;
    padding: 1rem;
    min-height: 100px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
    align-content: flex-start;
    position: relative;
}

.active-orgs-panel .no-selection {
    color: #888;
    text-align: center;
    padding: 1.5rem;
    font-style: italic;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Organization Badge */
.org-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #22c55e;
    color: #0a1a0d;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.org-badge:hover {
    background: #16a34a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.org-badge .remove-btn {
    background: transparent;
    border: none;
    color: #0a1a0d;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.org-badge .remove-btn:hover {
    transform: scale(1.2);
    color: #dc2626;
}

.btn-clear-all {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear-all:hover {
    background: #b91c1c;
}

/* Available Organizations Panel */
.available-orgs-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 1rem;
}

.available-orgs-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 0.5rem;
}

.org-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid rgba(34, 197, 94, 0.1);
    transition: background 0.2s ease;
}

.org-list-item:hover {
    background: rgba(34, 197, 94, 0.05);
}

.org-list-item:last-child {
    border-bottom: none;
}

.org-name {
    color: #f0f0f0;
    font-size: 0.9rem;
    flex: 1;
}

.btn-add {
    background: #22c55e;
    color: #0a1a0d;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-add:hover {
    background: #16a34a;
    transform: translateX(2px);
}

.btn-add:active {
    transform: translateX(0);
}

/* Spinner for loading */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .active-orgs-panel {
        min-height: 80px;
        padding: 0.75rem;
    }
    
    .org-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    .available-orgs-list {
        max-height: 250px;
    }
    
    .org-list-item {
        padding: 0.6rem;
    }
    
    .org-name {
        font-size: 0.85rem;
    }
    
    .btn-add {
        font-size: 0.8rem;
        padding: 0.35rem 0.8rem;
    }
}

/* =============================================
   CENTER PHOTOS & BANNER STYLES
   ============================================= */

/* Photo Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.photo-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #1a2f1e;
    border: 2px solid #333;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.photo-card:hover {
    border-color: #22c55e;
}

.photo-card.primary {
    border-color: #22c55e;
    border-width: 3px;
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-card .primary-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: #22c55e;
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.photo-card .photo-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 3px;
    padding: 5px;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.photo-card:hover .photo-actions {
    opacity: 1;
}

.photo-card.add-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-style: dashed;
    cursor: pointer;
}

.photo-card.add-photo:hover {
    background: rgba(34, 197, 94, 0.1);
}

/* Extra small button for photo actions */
.btn-xs {
    padding: 2px 6px;
    font-size: 0.65rem;
}

/* Default Banners Grid */
.default-banners-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.default-banner-option {
    cursor: pointer;
    border: 2px solid #333;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s ease;
    padding: 5px;
    text-align: center;
}

.default-banner-option:hover {
    border-color: #22c55e;
    transform: scale(1.02);
}

.default-banner-option.selected {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.default-banner-option img {
    width: 100%;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

/* Responsive for smaller screens */
@media (max-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .default-banners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   WhatsApp-Style Chat Modal
   ======================================== */

.whatsapp-chat-modal {
    max-width: 450px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
}

.whatsapp-header {
    background: #1a3d2b;
    padding: 14px 16px;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #22c55e;
}

.whatsapp-header h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: #22c55e;
    margin: 0;
}

.whatsapp-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #0d1f14;
    min-height: 0;
}

.whatsapp-msg-bubble {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 0 8px 8px 8px;
    background: #1a3d2b;
    align-self: flex-start;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Own messages - right aligned, different color */
.whatsapp-msg-own {
    align-self: flex-end;
    background: #054640;
    border-radius: 8px 0 8px 8px;
}

.whatsapp-msg-own .whatsapp-msg-sender {
    color: #4ade80;
}

.whatsapp-msg-sender {
    font-size: 12px;
    font-weight: 600;
    color: #22c55e;
    margin-bottom: 4px;
}

.whatsapp-msg-text {
    color: #e0e0e0;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.whatsapp-msg-time {
    font-size: 10px;
    color: #888;
    text-align: right;
    margin-top: 4px;
}

.whatsapp-system-msg {
    text-align: center;
    margin: 8px 0;
    align-self: center;
}

.whatsapp-system-msg span {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 14px;
    border-radius: 16px;
    font-size: 12px;
    color: #888;
    font-style: italic;
    display: inline-block;
}

.whatsapp-input-area {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: #1a2f1e;
    border-radius: 0 0 12px 12px;
    border-top: 1px solid #22c55e;
}

.whatsapp-input-area input {
    flex: 1;
    padding: 10px 16px;
    border-radius: 20px;
    border: 1px solid #22c55e;
    background: #0d1f14;
    color: #e0e0e0;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.whatsapp-input-area input:focus {
    border-color: #4ade80;
}

.whatsapp-input-area input::placeholder {
    color: #666;
}

.whatsapp-send-btn {
    padding: 10px 20px;
    border-radius: 20px;
    background: #22c55e;
    color: #000;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.whatsapp-send-btn:hover {
    background: #4ade80;
}

/* Mobile responsive */
@media (max-width: 500px) {
    .whatsapp-chat-modal {
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .whatsapp-header {
        border-radius: 0;
    }

    .whatsapp-input-area {
        border-radius: 0;
    }
}

/* ==================== Form Validation Error Styles ==================== */
.input-error {
    border-color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.1) !important;
}

.field-error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

