/* CSS Reset & Variables */
:root {
    --bg-main: #0b0905;
    --bg-card: rgba(27, 21, 11, 0.78);
    --bg-sidebar: #110e08;
    --border-color: rgba(205, 165, 76, 0.2);
    --border-hover: rgba(245, 211, 125, 0.55);
    
    --text-primary: #f8f9fa;
    --text-muted: #9f9cb0;
    
    --color-primary: #b88927;
    --color-primary-rgb: 184, 137, 39;
    --color-primary-glow: rgba(232, 190, 94, 0.28);
    --color-accent: #f2d27b;
    
    --color-success: #10b981;
    --color-success-glow: rgba(16, 185, 129, 0.2);
    --color-warning: #f59e0b;
    --color-warning-glow: rgba(245, 158, 11, 0.2);
    --color-danger: #ef4444;
    --color-danger-glow: rgba(239, 68, 68, 0.2);
    
    --font-sans: 'Outfit', 'Prompt', system-ui, -apple-system, sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-neon: 0 0 24px rgba(232, 190, 94, 0.18);
    --shadow-card: 0 12px 36px 0 rgba(0, 0, 0, 0.56);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(circle at 8% 12%, rgba(201, 157, 57, 0.15), transparent 38%),
        radial-gradient(circle at 90% 85%, rgba(139, 98, 27, 0.13), transparent 42%),
        radial-gradient(circle at 50% 50%, #1c160a, #0b0905);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.3;
    background-image:
        radial-gradient(ellipse at 75% 42%, rgba(11, 9, 5, 0.02) 0%, rgba(11, 9, 5, 0.24) 48%, rgba(11, 9, 5, 0.72) 75%, rgba(11, 9, 5, 0.96) 100%),
        url("/assets/hanuman-mask-gold.png"),
        radial-gradient(circle at 76% 34%, rgba(242, 210, 123, 0.22), transparent 34%),
        linear-gradient(135deg, rgba(242, 210, 123, 0.13), transparent 42%, rgba(184, 137, 39, 0.1));
    background-size: cover, min(64vw, 760px) auto, cover, cover;
    background-position: center, center center, center, center;
    background-repeat: no-repeat;
    filter:
        sepia(1)
        saturate(1.55)
        hue-rotate(350deg)
        brightness(1.18)
        contrast(1.08)
        drop-shadow(0 0 14px rgba(242, 210, 123, 0.25));
    background-blend-mode: normal, multiply, screen, normal;
    mix-blend-mode: lighten;
    mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.86) 42%, rgba(0, 0, 0, 0.34) 68%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.86) 42%, rgba(0, 0, 0, 0.34) 68%, transparent 100%);
}

body::after {
    content: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(157, 78, 221, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(157, 78, 221, 0.6);
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Sidebar Navigation */
.sidebar {
    width: 230px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1rem;
    flex-shrink: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.5);
}

.brand-icon svg {
    width: 24px;
    height: 24px;
}

.brand h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #fff, var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.7rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.nav-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    transition: var(--transition-smooth);
}

.nav-btn:hover {
    color: var(--text-primary);
    background-color: rgba(157, 78, 221, 0.08);
    border-color: rgba(157, 78, 221, 0.1);
}

.nav-btn.active {
    color: white;
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.25), rgba(199, 125, 255, 0.1));
    border-color: var(--border-color);
    box-shadow: inset 0 0 8px rgba(157, 78, 221, 0.15);
    position: relative;
}

.nav-btn.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 4px;
    background-color: var(--color-accent);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px var(--color-accent);
}

.nav-btn.active svg {
    color: var(--color-accent);
    filter: drop-shadow(0 0 5px var(--color-accent));
}

.sidebar-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.sim-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sim-badge .dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-success);
    animation: pulse-glow 2s infinite;
}

.creator-signature {
    margin-top: 1rem;
    padding: 0.85rem 0.75rem 0.7rem;
    border: 1px solid rgba(242, 210, 123, 0.18);
    border-radius: 14px;
    background:
        radial-gradient(circle at 80% 20%, rgba(242, 210, 123, 0.12), transparent 38%),
        linear-gradient(135deg, rgba(184, 137, 39, 0.08), rgba(0, 0, 0, 0.18));
    text-align: center;
    box-shadow: inset 0 0 18px rgba(242, 210, 123, 0.04);
}

.signature-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.05rem;
}

.signature-name {
    display: block;
    font-family: 'Alex Brush', cursive;
    font-size: 2.35rem;
    line-height: 1;
    letter-spacing: 0.04em;
    color: var(--color-accent);
    text-shadow:
        0 0 10px rgba(242, 210, 123, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.55);
    transform: rotate(-3deg);
}

/* Main Content Layout */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.5rem;
    overflow-y: auto;
    max-height: 100vh;
}

body.dashboard-active .main-content {
    overflow: hidden;
}

body.dashboard-active .app-header {
    margin-bottom: 0.65rem;
    padding-bottom: 0.5rem;
}

body.dashboard-active .header-info h1 {
    font-size: 1.45rem;
    margin-bottom: 0.08rem;
}

body.dashboard-active .current-date {
    font-size: 0.78rem;
}

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

.header-info h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    background: linear-gradient(90deg, #fff, #ebd3ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.current-date {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.language-toggle {
    min-width: 44px;
    padding: 0.45rem 0.6rem;
    border: 1px solid rgba(242, 210, 123, 0.35);
    border-radius: 7px;
    background: linear-gradient(135deg, rgba(184, 137, 39, 0.2), rgba(13, 10, 5, 0.76));
    color: var(--color-accent);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 0 14px rgba(232, 190, 94, 0.08);
}

.language-toggle:hover {
    border-color: rgba(242, 210, 123, 0.68);
    color: #fff6d4;
    transform: translateY(-1px);
}

.guild-info {
    background: rgba(157, 78, 221, 0.1);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-weight: 600;
    color: var(--color-accent);
    text-shadow: 0 0 8px rgba(199, 125, 255, 0.4);
}

/* Tab Content Visibility */
.content-view {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

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

/* Cards (Glassmorphism design) */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: var(--shadow-card);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.card:hover {
    border-color: rgba(199, 125, 255, 0.25);
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.6), 0 0 15px rgba(157, 78, 221, 0.1);
}

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

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.card-body {
    padding: 1.25rem;
}

/* Grid Layouts */
.grid-layout {
    display: grid;
    grid-template-columns: minmax(390px, 480px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.dashboard-left-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

#view-dashboard .card-header {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
}

#view-dashboard .card-header h3 {
    font-size: 1rem;
    line-height: 1.25;
}

#view-dashboard .card-body {
    padding: 1rem;
}

#view-dashboard .badge {
    font-size: 0.72rem;
    padding: 0.35rem 0.7rem;
}

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

    .attendance-grid-container {
        max-height: 520px;
    }
}

@media (min-width: 1500px) {
    .grid-layout {
        grid-template-columns: minmax(430px, 520px) minmax(0, 1fr);
    }
}

/* Loot Drop Column */
.loot-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.loot-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    transition: var(--transition-smooth);
    gap: 0.75rem;
}

.loot-item-row:hover {
    background: rgba(157, 78, 221, 0.05);
    border-color: rgba(157, 78, 221, 0.2);
}

.item-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.item-icon {
    font-size: 1.15rem;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.icon-card {
    border-color: rgba(72, 202, 228, 0.3);
    background: rgba(72, 202, 228, 0.05);
}
.icon-wisdom {
    border-color: rgba(255, 183, 3, 0.3);
    background: rgba(255, 183, 3, 0.05);
}
.icon-attack {
    border-color: rgba(255, 77, 109, 0.3);
    background: rgba(255, 77, 109, 0.05);
}

.item-name {
    display: block;
    font-size: 0.96rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
}

.item-desc {
    font-size: 0.74rem;
    color: var(--text-muted);
    line-height: 1.25;
}

.item-counter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 112px;
    height: 39px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 0.25rem;
}

.btn-count-adj {
    background: none;
    border: none;
    color: var(--text-primary);
    width: 29px;
    height: 29px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.btn-count-adj:hover {
    background-color: var(--color-primary);
    box-shadow: 0 0 8px var(--color-primary);
}

.input-drop-count {
    width: 48px;
    text-align: center;
    background: none;
    border: none;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
}

.input-drop-count:focus {
    outline: none;
}

.limit-input-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
    width: 112px;
    height: 39px;
    padding: 0.2rem 0.42rem;
    border: 1px solid rgba(232, 190, 94, 0.22);
    border-radius: 25px;
    background: rgba(0, 0, 0, 0.32);
}

.limit-number-input {
    width: 48px;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 800;
    text-align: center;
}

.limit-input-wrap:focus-within {
    border-color: rgba(232, 190, 94, 0.5);
    box-shadow: 0 0 0 3px rgba(232, 190, 94, 0.10);
}

.limit-unit {
    color: var(--color-accent);
    font-size: 0.68rem;
    font-weight: 800;
    white-space: nowrap;
}

/* Remove default spin buttons */
.input-drop-count::-webkit-outer-spin-button,
.input-drop-count::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Buttons */
.btn {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), #7b2cbf);
    color: white;
    box-shadow: 0 4px 15px rgba(157, 78, 221, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 4px 25px rgba(199, 125, 255, 0.5), 0 0 10px var(--color-primary-glow);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(1px);
}

#view-dashboard .btn-sm {
    padding: 0.38rem 0.65rem;
    font-size: 0.78rem;
}

#view-dashboard .btn-run-distribute {
    width: 100%;
    min-height: 42px;
    justify-content: center;
}

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

.btn-outline:hover {
    background-color: rgba(157, 78, 221, 0.1);
    border-color: var(--color-accent);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    box-shadow: 0 0 10px var(--color-danger-glow);
}

.btn-success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.btn-success:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: #10b981;
    box-shadow: 0 0 10px var(--color-success-glow);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 6px;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Run distribute button styling */
.action-btn-container {
    margin-top: 1.5rem;
}

.btn-run-distribute {
    width: 100%;
    padding: 1.25rem;
    font-size: 1.1rem;
    border-radius: 12px;
}

.run-icon {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* Badges */
.badge {
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-purple {
    background: rgba(157, 78, 221, 0.2);
    color: var(--color-accent);
    border: 1px solid rgba(157, 78, 221, 0.3);
}

.badge-status {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.report-filter-row {
    align-items: center;
}

.report-filter {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    padding: 0.55rem 0.8rem;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
}

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.report-stat-card {
    border: 1px solid rgba(var(--color-primary-rgb), 0.22);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.10), rgba(15, 23, 42, 0.35));
    border-radius: 14px;
    padding: 0.9rem 1rem;
}

.report-stat-card span {
    display: block;
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-bottom: 0.35rem;
}

.report-stat-card strong {
    display: block;
    color: var(--color-accent);
    font-size: 1.45rem;
    line-height: 1;
}

.report-grid {
    display: grid;
    gap: 1rem;
}

.report-panel {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.16);
    border-radius: 14px;
    padding: 0.85rem;
}

.report-panel h4 {
    margin: 0 0 0.75rem;
    color: var(--text-primary);
    font-size: 0.98rem;
}

.table-report th,
.table-report td {
    vertical-align: top;
    font-size: 0.82rem;
}

.report-name-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem;
}

.report-name-list span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(245, 158, 11, 0.20);
    background: rgba(245, 158, 11, 0.08);
    color: var(--text-primary);
    border-radius: 999px;
    padding: 0.12rem 0.45rem;
    font-size: 0.74rem;
    white-space: nowrap;
}

@media (max-width: 860px) {
    .report-summary-grid {
        grid-template-columns: 1fr;
    }
}

.badge-waiting {
    background: var(--color-warning-glow);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-received {
    background: var(--color-success-glow);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Attendance management controls */
.header-actions-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.member-controls {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
    align-items: center;
}

.search-box {
    position: relative;
    flex-grow: 1;
}

.search-box input {
    width: 100%;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 8px var(--color-primary-glow);
}

.add-member-form {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.add-member-form input {
    width: 180px;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.add-member-form input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 8px var(--color-primary-glow);
}

/* Tables styling */
.attendance-list-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.table-responsive {
    overflow-x: auto;
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.queue-list-card .table-responsive {
    max-height: 480px;
    overflow-y: auto;
}

.history-card .table-responsive {
    max-height: 520px;
    overflow-y: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: rgb(22, 16, 36) !important; /* Solid dark background to prevent overlap translucency */
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.5rem 0.85rem;
    border-bottom: 2px solid var(--border-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 0.5rem 0.85rem;
    border-bottom: 1px solid rgba(157, 78, 221, 0.08);
    color: #fff;
}

.table tbody tr {
    transition: var(--transition-smooth);
}

.table tbody tr:hover {
    background-color: rgba(157, 78, 221, 0.03);
}

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

/* Checkbox design */
.checkbox-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    user-select: none;
    width: 22px;
    height: 22px;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: var(--transition-smooth);
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--color-accent);
    box-shadow: 0 0 6px var(--color-primary-glow);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--color-primary);
    border-color: var(--color-accent);
    box-shadow: 0 0 10px var(--color-primary-glow);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Queue Grid */
.queue-grid {
    display: grid;
    grid-template-columns: minmax(350px, 0.95fr) minmax(0, 1.75fr);
    gap: 1.25rem;
    align-items: start;
}

.queue-left-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

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

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group select,
.queue-member-card select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.form-group select:focus,
.queue-member-card select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 8px var(--color-primary-glow);
}

.queue-member-tools {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.65rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(var(--color-primary-rgb), 0.16);
    border-radius: 12px;
}

.queue-member-add-row,
.queue-member-action-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.queue-member-tools input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.58rem 0.85rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.86rem;
    transition: var(--transition-smooth);
}

.queue-member-tools input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 8px var(--color-primary-glow);
}

.queue-member-action-row {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 0.55rem;
}

.queue-action-btn {
    justify-content: center;
    min-height: 34px;
    border-radius: 9px;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.queue-action-import {
    color: var(--color-accent);
    border: 1px solid rgba(var(--color-primary-rgb), 0.45);
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.18), rgba(var(--color-primary-rgb), 0.06));
}

.queue-action-import:hover {
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.28), rgba(var(--color-primary-rgb), 0.10));
    box-shadow: 0 0 12px rgba(var(--color-primary-rgb), 0.18);
}

.queue-action-remove {
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.07);
}

.queue-action-remove:hover {
    background: rgba(245, 158, 11, 0.13);
    border-color: rgba(245, 158, 11, 0.55);
}

.queue-action-danger {
    color: var(--color-danger);
    border: 1px solid rgba(239, 68, 68, 0.38);
    background: rgba(239, 68, 68, 0.08);
}

.queue-action-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.6);
}

@media (max-width: 720px) {
    .queue-member-add-row,
    .queue-member-action-row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
}

/* Modal Dialog Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #120d22;
    border: 1px solid var(--border-color);
    margin: 8% auto;
    width: 90%;
    max-width: 650px;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8), 0 0 25px rgba(157, 78, 221, 0.25);
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

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

.modal-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}

.modal-close {
    color: var(--text-muted);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    transition: var(--transition-smooth);
}

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

.modal-body {
    padding: 2rem;
    max-height: 450px;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    background-color: rgba(13, 9, 24, 0.8);
}

/* Loot Distribution Modal Report Body Styling */
.report-section {
    margin-bottom: 1.5rem;
}

.report-section:last-child {
    margin-bottom: 0;
}

.report-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.report-list-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-list-item span {
    font-weight: 500;
}

.report-list-item .item-lbl {
    color: var(--text-muted);
}

.report-list-item .user-val {
    color: #fff;
    font-weight: 600;
}

.report-empty {
    color: var(--text-muted);
    font-style: italic;
    padding: 0.5rem;
}

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

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 4px var(--color-success); }
    50% { box-shadow: 0 0 12px var(--color-success); }
    100% { box-shadow: 0 0 4px var(--color-success); }
}

/* Radio Pill Styles for Quantity Selection */
.radio-pill-group {
    display: flex;
    gap: 0.35rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.2rem;
    margin-top: 0.2rem;
}

.radio-pill {
    flex: 1;
    cursor: pointer;
    position: relative;
    text-align: center;
    user-select: none;
}

.radio-pill input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-pill span {
    display: block;
    padding: 0.35rem 0.4rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.radio-pill:hover span {
    color: #fff;
    background: rgba(157, 78, 221, 0.1);
    border-color: rgba(157, 78, 221, 0.2);
}

.radio-pill input:checked ~ span {
    background: linear-gradient(135deg, var(--color-primary), #7b2cbf);
    color: #fff;
    border-color: var(--color-accent);
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.4);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.queue-items-flex {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    align-items: center;
}

.queue-type-pills {
    gap: 0.45rem;
}

.special-start-card {
    margin: 0.4rem 0 0.85rem;
    padding: 0.75rem;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.10), rgba(0, 0, 0, 0.18));
}

.special-start-card[hidden] {
    display: none !important;
}

.special-start-card-title {
    color: var(--color-accent);
    font-weight: 800;
    font-size: 0.86rem;
    margin-bottom: 0.2rem;
}

.special-start-card-hint {
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.35;
    margin-bottom: 0.55rem;
}

.special-start-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

.special-start-grid label {
    display: grid;
    gap: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
}

.special-start-grid input {
    width: 100%;
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.32);
    color: var(--text-primary);
    padding: 0.38rem 0.45rem;
    font-weight: 800;
}

@media (max-width: 760px) {
    .special-start-grid {
        grid-template-columns: 1fr;
    }
}

/* Premium Loot Tags inside tables */
.loot-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.45rem;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.loot-tag-waiting {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #ffb703;
}

.loot-tag-received {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.loot-tag-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.loot-tag-waiting .loot-tag-dot {
    background-color: #f59e0b;
    box-shadow: 0 0 6px #f59e0b;
}

.loot-tag-received .loot-tag-dot {
    background-color: #10b981;
    box-shadow: 0 0 6px #10b981;
}

.loot-tag-name {
    letter-spacing: 0.3px;
}

.loot-tag-qty {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 0.05rem 0.25rem;
    border-radius: 3px;
    font-size: 0.68rem;
    margin-left: 0.15rem;
}

.queue-quantity-panel {
    margin-top: 0.55rem;
    padding: 0.7rem;
    border: 1px solid rgba(232, 190, 94, 0.20);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(232, 190, 94, 0.08), rgba(0, 0, 0, 0.18)),
        radial-gradient(circle at top right, rgba(242, 210, 123, 0.10), transparent 55%);
    box-shadow: inset 0 0 20px rgba(232, 190, 94, 0.035);
}

.queue-item-choice-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--color-accent) !important;
    font-size: 0.84rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.01em;
    margin-bottom: 0.12rem !important;
}

.queue-item-choice-label::before {
    content: "🎁";
    filter: drop-shadow(0 0 6px rgba(232, 190, 94, 0.26));
}

.queue-item-choice-hint {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Item Quantity Selection Row inside Forms */
.item-qty-row {
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(232, 190, 94, 0.11);
    border-radius: 10px;
    padding: 0.45rem 0.58rem;
    margin-bottom: 0.42rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: var(--transition-smooth);
}

.item-qty-row:hover {
    background: rgba(232, 190, 94, 0.045);
    border-color: rgba(232, 190, 94, 0.28);
}

.item-qty-row-label {
    font-size: 0.73rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    flex-grow: 1;
    flex-shrink: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 0.5rem;
}

.item-qty-row .radio-pill-group {
    margin-top: 0;
    width: 290px;
    flex-grow: 0;
    flex-shrink: 0;
}

.item-qty-row .radio-pill span {
    padding: 0.3rem 0.25rem;
    font-size: 0.75rem;
}

.queue-qty-input-wrap {
    width: 118px;
    flex: 0 0 118px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    padding: 0.22rem 0.45rem;
    border: 1px solid rgba(232, 190, 94, 0.24);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.22);
}

.queue-qty-input {
    width: 58px;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 800;
    text-align: center;
    font-family: var(--font-sans);
}

.queue-qty-input-wrap:focus-within {
    border-color: rgba(232, 190, 94, 0.52);
    box-shadow: 0 0 0 3px rgba(232, 190, 94, 0.10);
}

.queue-qty-unit {
    color: var(--color-accent);
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.queue-qty-input::-webkit-outer-spin-button,
.queue-qty-input::-webkit-inner-spin-button {
    margin: 0;
}

/* Compact queue workspace: keep the left tools small so the queue table gets more room. */
#view-queue .queue-grid {
    grid-template-columns: minmax(285px, 315px) minmax(0, 1fr);
    gap: 0.85rem;
}

#view-queue .queue-left-col {
    gap: 0.7rem;
}

#view-queue .card-header {
    padding: 0.65rem 0.85rem;
}

#view-queue .card-header h3 {
    font-size: 0.95rem;
    line-height: 1.2;
}

#view-queue .card-body {
    padding: 0.8rem;
}

#view-queue .form-group {
    margin-bottom: 0.9rem;
}

#view-queue .form-group label {
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
}

#view-queue .form-group select,
#view-queue .queue-member-card select {
    padding: 0.55rem 0.7rem;
    font-size: 0.84rem;
}

#view-queue .queue-member-tools {
    gap: 0.45rem;
    margin-top: 0.45rem;
    padding: 0.55rem;
    border-radius: 10px;
}

#view-queue .queue-member-add-row,
#view-queue .queue-member-action-row {
    gap: 0.35rem;
}

#view-queue .queue-member-tools input {
    padding: 0.48rem 0.65rem;
    font-size: 0.8rem;
}

#view-queue .btn-sm {
    padding: 0.34rem 0.5rem;
    font-size: 0.72rem;
}

#view-queue .queue-action-btn {
    min-height: 30px;
    border-radius: 8px;
    letter-spacing: 0;
}

#view-queue .queue-member-action-row {
    grid-template-columns: 1fr 1fr;
}

#view-queue .queue-action-import {
    grid-column: 1 / -1;
}

#view-queue .queue-clear-all-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 8px;
}

#view-queue .item-qty-row {
    display: flex;
    padding: 0.42rem 0.5rem;
    margin-bottom: 0.4rem;
}

#view-queue .item-qty-row-label {
    display: block;
    margin-bottom: 0;
    padding-right: 0;
    font-size: 0.68rem;
}

#view-queue .queue-quantity-panel {
    padding: 0.58rem;
}

#view-queue .queue-item-choice-hint {
    margin-bottom: 0.42rem;
}

#view-queue .item-qty-row .radio-pill-group {
    width: 100%;
    gap: 0.2rem;
    padding: 0.16rem;
}

#view-queue .item-qty-row .radio-pill span {
    padding: 0.28rem 0.12rem;
    font-size: 0.68rem;
}

#view-queue .register-queue-card .form-actions button {
    width: 100%;
    padding: 0.46rem 0.42rem;
    font-size: 0.72rem;
    line-height: 1.15;
    white-space: nowrap;
}

#view-queue .register-queue-card .form-actions {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: 0.35rem;
}

#view-queue .queue-add-all-btn {
    border-color: rgba(var(--color-primary-rgb), 0.38);
    color: var(--color-accent);
    background: rgba(var(--color-primary-rgb), 0.07);
}

#view-queue .queue-list-card .table-responsive {
    max-height: calc(100vh - 220px);
}

#view-queue .table th,
#view-queue .table td {
    padding: 0.42rem 0.58rem;
    font-size: 0.82rem;
}

#view-queue .queue-list-card .card-header {
    align-items: flex-start;
    gap: 0.75rem;
}

#view-queue .queue-list-card .header-actions-row {
    gap: 0.4rem;
}

#view-queue .queue-list-card .search-box input {
    padding: 0.42rem 0.7rem;
    font-size: 0.8rem;
}

@media (max-width: 1100px) {
    #view-queue .queue-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    #view-queue .register-queue-card .form-actions {
        grid-template-columns: 1fr;
    }
}

/* Responsive adjustment for form row */
@media (max-width: 768px) {
    .item-qty-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .item-qty-row .radio-pill-group {
        width: 100%;
    }
}

/* Luxurious Dark Gold finish. Kept at the end so legacy component rules inherit
   the production palette without rewriting every component selector. */
body {
    background-color: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: rgba(205, 165, 76, 0.42);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(242, 210, 123, 0.7);
}

.brand-icon,
.btn-primary {
    background: linear-gradient(135deg, #7c5618 0%, #c79a38 48%, #f0d17b 100%);
    color: #1a1205;
    box-shadow: 0 5px 20px rgba(220, 178, 77, 0.24);
}

.brand h2,
.header-info h1 {
    background: linear-gradient(100deg, #fff7dc 0%, #f0d17b 52%, #b88628 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-btn:hover,
.nav-btn.active,
.loot-item-row:hover,
.btn-outline:hover {
    background-color: rgba(205, 165, 76, 0.09);
    border-color: rgba(232, 190, 94, 0.3);
}

.nav-btn.active {
    background: linear-gradient(135deg, rgba(184, 137, 39, 0.27), rgba(242, 210, 123, 0.08));
    box-shadow: inset 0 0 12px rgba(232, 190, 94, 0.1);
}

.nav-btn.active::after {
    background-color: var(--color-accent);
    box-shadow: 0 0 10px rgba(242, 210, 123, 0.7);
}

.nav-btn.active svg,
.guild-info {
    color: var(--color-accent);
    text-shadow: 0 0 9px rgba(242, 210, 123, 0.34);
}

.card:hover {
    border-color: rgba(232, 190, 94, 0.32);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.62), 0 0 18px rgba(205, 165, 76, 0.09);
}

.gw-session-card {
    overflow: hidden;
    border-color: rgba(232, 190, 94, 0.22);
}

.gw-session-header {
    padding: 0.68rem 1.15rem 0.48rem;
    border-bottom: 1px solid rgba(232, 190, 94, 0.12);
}

.gw-session-header h3 {
    letter-spacing: 0.01em;
}

.gw-date-input {
    width: 100%;
    background: linear-gradient(135deg, #fff6dd, #ead19a);
    border: 1px solid rgba(184, 137, 39, 0.55);
    border-radius: 9px;
    color: #2a1d08;
    padding: 0.42rem 0.72rem;
    font-family: var(--font-sans);
    outline: none;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 5px 14px rgba(0, 0, 0, 0.16);
}

.gw-date-input:focus {
    box-shadow: 0 0 0 3px rgba(232, 190, 94, 0.22);
}

.gw-date-input.locked-date,
.gw-date-input:disabled {
    cursor: not-allowed;
    opacity: 1;
    color: #2a1d08;
    background:
        linear-gradient(135deg, rgba(255, 246, 221, 0.86), rgba(234, 209, 154, 0.82));
    box-shadow: inset 0 0 0 1px rgba(95, 65, 18, 0.18);
}

.gw-date-card-body {
    padding: 0.72rem 1.15rem 0.82rem;
}

.gw-date-layout {
    display: grid;
    grid-template-columns: minmax(210px, 1fr) minmax(168px, 0.7fr);
    gap: 0.72rem;
    align-items: stretch;
}

.gw-date-main {
    min-width: 0;
    display: grid;
    gap: 0.25rem;
    padding: 0.5rem;
    border: 1px solid rgba(232, 190, 94, 0.14);
    border-radius: 12px;
    background: radial-gradient(circle at top left, rgba(232, 190, 94, 0.12), transparent 52%), rgba(0, 0, 0, 0.16);
}

.gw-date-label {
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.gw-day-status {
    display: inline-flex;
    width: fit-content;
    margin-top: 0.05rem;
    padding: 0.16rem 0.42rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.10);
    border: 1px solid rgba(16, 185, 129, 0.18);
    font-size: 0.68rem;
    font-weight: 800;
}

.gw-date-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 0.48rem 0.66rem;
    border: 1px solid rgba(242, 210, 123, 0.22);
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(242, 210, 123, 0.12), rgba(0, 0, 0, 0.20)),
        radial-gradient(circle at bottom right, rgba(232, 190, 94, 0.10), transparent 55%);
    color: var(--color-accent);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.32;
    text-align: center;
    white-space: normal;
    box-shadow: inset 0 0 18px rgba(242, 210, 123, 0.06);
}

@media (max-width: 560px) {
    .gw-date-layout {
        grid-template-columns: 1fr;
    }

    .gw-date-hint {
        white-space: normal;
        text-align: left;
    }
}

/* Drag and Drop styling for Queue */
.draggable-queue-row {
    transition: background-color 0.2s ease, opacity 0.2s ease;
}
.draggable-queue-row.dragging {
    opacity: 0.4;
    background: rgba(157, 78, 221, 0.1) !important;
    border: 1px dashed var(--color-accent) !important;
}

/* Attendance Grid layout */
.attendance-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 0.45rem;
    max-height: calc(100vh - 315px);
    min-height: 360px;
    overflow-y: auto;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.member-attendance-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.32rem 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: var(--transition-smooth);
}

@media (max-width: 900px) {
    .member-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .add-member-form,
    .add-member-form input {
        width: 100%;
    }

    .attendance-grid-container {
        min-height: 280px;
        max-height: 520px;
    }
}

.member-attendance-card:hover {
    background: rgba(157, 78, 221, 0.05);
    border-color: rgba(157, 78, 221, 0.25);
}

.member-attendance-card.attended {
    background: rgba(16, 185, 129, 0.04);
    border-color: rgba(16, 185, 129, 0.25);
}

/* Dashboard compact mode: keep the first screen useful without scrolling. */
#view-dashboard .grid-layout {
    grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
    gap: 0.72rem;
    height: calc(100vh - 108px);
    overflow: hidden;
}

#view-dashboard .dashboard-left-col {
    gap: 0.68rem;
    max-height: 100%;
    overflow: hidden;
}

#view-dashboard .card {
    border-radius: 14px;
}

#view-dashboard .card-header {
    padding: 0.55rem 0.82rem;
}

#view-dashboard .card-header h3 {
    font-size: 0.9rem;
}

#view-dashboard .loot-card .card-header {
    justify-content: flex-start;
    background:
        linear-gradient(90deg, rgba(232, 190, 94, 0.12), rgba(0, 0, 0, 0.08)),
        rgba(0, 0, 0, 0.10);
}

#view-dashboard .loot-card .card-header h3 {
    font-size: 0.98rem;
    font-weight: 900;
    color: #fff4cc;
    text-shadow: 0 0 10px rgba(232, 190, 94, 0.18);
}

#view-dashboard .card-body {
    padding: 0.68rem 0.78rem;
}

#view-dashboard .loot-input-group {
    gap: 0.5rem;
    margin-bottom: 0.58rem;
}

#view-dashboard .loot-item-row {
    display: grid;
    grid-template-columns: 1fr;
    padding: 0.48rem 0.56rem;
    border-radius: 12px;
    gap: 0.38rem;
    align-items: stretch;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.16)),
        radial-gradient(circle at top left, rgba(232, 190, 94, 0.08), transparent 54%);
    border-color: rgba(232, 190, 94, 0.14);
}

#view-dashboard .loot-item-row > div:last-child {
    width: 100%;
    flex: none;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.55rem !important;
    align-items: end !important;
}

#view-dashboard .limit-selector-wrapper,
#view-dashboard .loot-item-row > div:last-child > div {
    width: 100%;
    min-width: 0;
}

#view-dashboard .item-icon {
    width: 32px;
    height: 32px;
    font-size: 1.04rem;
    border-radius: 9px;
    flex: 0 0 32px;
}

#view-dashboard .item-info {
    gap: 0.5rem;
    padding-bottom: 0;
    border-bottom: none;
}

#view-dashboard .item-name {
    font-size: 0.94rem;
    line-height: 1.15;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
}

#view-dashboard .item-desc {
    display: none;
}

#view-dashboard .limit-selector-wrapper label,
#view-dashboard .loot-item-row > div:last-child > div > label {
    display: block !important;
    width: 100%;
    color: rgba(242, 210, 123, 0.76) !important;
    font-size: 0.66rem !important;
    font-weight: 800;
    margin-bottom: 0.14rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

#view-dashboard .limit-input-wrap {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0.15rem 0.34rem;
    border-color: rgba(232, 190, 94, 0.30);
    background: rgba(0, 0, 0, 0.26);
}

#view-dashboard .limit-number-input,
#view-dashboard .input-drop-count {
    width: 36px;
    font-size: 0.82rem;
}

#view-dashboard .limit-unit {
    max-width: 34px;
    font-size: 0.64rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

#view-dashboard .item-counter {
    width: 100%;
    height: 34px;
    padding: 0.15rem;
    border-color: rgba(232, 190, 94, 0.30);
    background: rgba(0, 0, 0, 0.26);
}

#view-dashboard .btn-count-adj {
    width: 25px;
    height: 25px;
    font-size: 1rem;
}

#view-dashboard .special-start-card {
    margin: 0.28rem 0 0.42rem;
    padding: 0.42rem 0.48rem;
    border-radius: 10px;
}

#view-dashboard .special-start-card-title {
    font-size: 0.74rem;
    margin-bottom: 0.08rem;
}

#view-dashboard .special-start-card-hint {
    display: none;
}

#view-dashboard .special-start-grid {
    gap: 0.32rem;
}

#view-dashboard .special-start-grid label {
    font-size: 0.67rem;
    gap: 0.18rem;
    text-align: center;
    align-items: center;
}

#view-dashboard .special-start-grid input {
    padding: 0.22rem 0.32rem;
    font-size: 0.78rem;
    text-align: center;
    max-width: 86px;
    justify-self: center;
}

#view-dashboard .action-btn-container {
    margin-top: 0.45rem;
}

#view-dashboard .btn-run-distribute {
    min-height: 36px;
    padding: 0.52rem 0.85rem;
}

#view-dashboard .attendance-card .card-header {
    align-items: flex-start;
}

#view-dashboard .attendance-card .card-subtitle {
    font-size: 0.78rem;
    margin-top: 0.12rem;
}

#view-dashboard .attendance-card .card-body {
    padding: 0.65rem;
}

#view-dashboard .attendance-card {
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#view-dashboard .attendance-card .card-body {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#view-dashboard .member-controls {
    gap: 0.42rem;
    margin-bottom: 0.48rem;
}

#view-dashboard .member-search input,
#view-dashboard .add-member-form input {
    padding: 0.46rem 0.62rem;
    font-size: 0.82rem;
}

#view-dashboard .attendance-grid-container {
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
    gap: 0.35rem;
    max-height: none;
    min-height: 0;
    flex: 1 1 auto;
    padding: 0.38rem;
}

#view-dashboard .member-attendance-card {
    padding: 0.28rem 0.44rem;
    font-size: 0.8rem;
}

.hidden {
    display: none !important;
}

.auth-panel {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid rgba(205, 165, 76, 0.24);
    border-radius: 7px;
    background: rgba(13, 10, 5, 0.62);
    color: var(--text-secondary);
    font-size: 0.78rem;
    white-space: nowrap;
}

.auth-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-warning);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.35);
}

.auth-status-dot.online {
    background: var(--color-success);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.auth-panel a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.auth-panel a:hover {
    color: #fff3c4;
}

.auth-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at 50% 20%, rgba(184, 137, 39, 0.24), transparent 38%),
        rgba(5, 4, 2, 0.84);
    backdrop-filter: blur(10px);
}

.auth-gate-panel {
    width: min(440px, 100%);
    padding: 1.5rem;
    border: 1px solid rgba(242, 210, 123, 0.24);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(31, 24, 12, 0.96), rgba(11, 9, 5, 0.98));
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
    text-align: center;
}

.auth-gate-kicker {
    margin-bottom: 0.5rem;
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.auth-gate-panel h2 {
    margin: 0 0 0.5rem;
    color: var(--text-primary);
    font-size: 1.35rem;
}

.auth-gate-panel p {
    margin: 0 0 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
