* {
    box-sizing: border-box;
}

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Courier New', Courier, monospace;
    background-color: #000;
    color: #FFD700;
    overflow-x: hidden;
    overflow-y: auto;
}

.splash-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.login-wrapper {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-logo {
    width: 250px;
    margin-bottom: 20px;
}

.service-title {
    font-size: 2em;
    color: #FFEA00;
    text-shadow: 0 0 10px rgba(255, 234, 0, 0.5);
    margin: 0;
}

.service-subtitle {
    font-size: 1.1em;
    opacity: 0.8;
    margin-bottom: 40px;
}

.discord-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #5865F2;
    color: white;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-family: sans-serif;
    font-weight: 600;
    transition: 0.2s;
}

.discord-login-btn:hover {
    background-color: #4752C4;
    transform: scale(1.05);
}

.discord-icon {
    width: 28px;
}

/* ================= DASHBOARD LAYOUT ================= */

.dashboard-grid-operations {
    grid-template-columns: 1.7fr 1fr;
    align-items: start;
}

.dashboard-side-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.activity-list strong {
    color: #FFD700;
}

.dashboard-page {
    display: flex;
    height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 215, 0, 0.05), transparent 30%),
        radial-gradient(circle at bottom right, rgba(255, 215, 0, 0.04), transparent 28%),
        #0a0a0a;
}

.sidebar {
    width: 280px;
    min-width: 280px;
    background-color: #0d0d0d;
    border-right: 1px solid rgba(255, 215, 0, 0.14);
    display: flex;
    flex-direction: column;
    transition: width 0.28s ease, min-width 0.28s ease;
    overflow: hidden;
    position: relative;
}

.sidebar.collapsed {
    width: 78px;
    min-width: 78px;
}

.content {
    flex-grow: 1;
    min-width: 0;
    padding: 30px;
    overflow-y: auto;
    transition: padding 0.25s ease;
}

/* ================= SIDEBAR ================= */

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 78px;
    padding: 16px 14px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.08);
    overflow: hidden;
}

.toggle-btn {
    width: 42px;
    height: 42px;
    background: transparent;
    border: none;
    color: #FFD700;
    font-size: 1.35rem;
    border-radius: 12px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.18s ease, transform 0.18s ease;
}

.toggle-btn:hover {
    background: rgba(255, 215, 0, 0.08);
    transform: scale(1.04);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.mini-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sidebar-title {
    white-space: nowrap;
    font-weight: 700;
    color: #fff4bf;
    line-height: 1.1;
}

.sidebar-subtitle {
    white-space: nowrap;
    font-size: 0.8rem;
    color: #9d9d9d;
    margin-top: 2px;
}

/* ================= NAVIGATION ================= */

.sidebar-nav {
    list-style: none;
    padding: 14px 8px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-links li {
    margin: 0;
}

.nav-link {
    color: #b9b9b9;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 12px;
    position: relative;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
    overflow: hidden;
}

.nav-label {
    white-space: nowrap;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    color: #fff4bf;
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(2px);
}

.nav-link.active {
    color: #FFD700;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.20), rgba(255, 215, 0, 0.06));
    box-shadow: inset 3px 0 0 #FFD700;
}

/* ================= SIDEBAR FOOTER ================= */

.sidebar-footer {
    margin-top: auto;
    padding: 16px 12px;
    border-top: 1px solid rgba(255, 215, 0, 0.08);
    overflow: hidden;
}

.sidebar-user-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.sidebar-user-info {
    color: #FFD700;
    line-height: 1.35;
    margin: 0;
    word-break: break-word;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.logout-link {
    color: #9d7bff;
    text-decoration: underline;
    transition: opacity 0.2s ease, transform 0.2s ease, color 0.18s ease;
}

.logout-link:hover {
    color: #c2a8ff;
}

/* ================= COLLAPSED SIDEBAR ================= */

.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .logout-link {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-8px);
}

.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .logout-link {
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 0;
    width: 54px;
    height: 54px;
    margin: 0 auto;
    border-radius: 14px;
}

.sidebar.collapsed .nav-link:hover {
    transform: none;
}

.sidebar.collapsed .toggle-btn {
    margin: 0 auto;
}

.sidebar.collapsed .sidebar-footer {
    padding: 12px 8px;
}

.sidebar.collapsed .sidebar-user-box {
    align-items: center;
}

/* Tooltipy při sbalení */
.sidebar.collapsed .nav-link::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: #111;
    color: #fff;
    padding: 8px 10px;
    border-radius: 10px;
    white-space: nowrap;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    border: 1px solid rgba(255,255,255,0.08);
    z-index: 50;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.sidebar.collapsed .nav-link:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(2px);
}

/* ================= TOP BAR / COMMON ================= */

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.top-bar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.status-indicator {
    color: #00ff00;
    font-size: 0.9rem;
}

.subtitle {
    margin: 5px 0 0;
    color: #9e9e9e;
    font-size: 0.95rem;
}

/* ================= DASHBOARD ================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: #1a1a1a;
    padding: 20px;
    border-left: 4px solid #FFD700;
    border-radius: 10px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.stat-number {
    font-size: 2rem;
    margin-top: 10px;
}

.dashboard-panel {
    background: #141414;
    border: 1px solid #222;
    border-left: 4px solid #FFD700;
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dashboard-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.dashboard-panel h2 {
    margin-top: 0;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-list li {
    padding: 10px 0;
    border-bottom: 1px solid #222;
    color: #ccc;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-action-btn {
    background: #FFD700;
    color: #000;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.quick-action-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.loading-box {
    background: #111;
    border-left: 4px solid #FFD700;
    padding: 20px;
    border-radius: 10px;
}

/* ================= ROSTER ================= */

.roster-wrapper {
    min-width: 1500px;
}

.roster-table-header,
.roster-row {
    display: grid;
    grid-template-columns:
        1.5fr 0.9fr 0.9fr 0.9fr 0.95fr
        1fr 1.4fr
        repeat(12, 0.42fr)
        0.65fr;
    gap: 8px;
    align-items: center;
}

.roster-table-header {
    padding: 12px;
    background: #0d0d0d;
    color: #666;
    font-size: 0.7rem;
    border: 1px solid #1a1a1a;
    position: sticky;
    top: 0;
    z-index: 10;
}

.roster-row {
    padding: 12px;
    background: #111;
    border-bottom: 1px solid #1b1b1b;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.16s ease;
}

.roster-row:hover {
    background: #161616;
}

.roster-row.empty {
    color: #555;
}

.rank-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.rank-cell span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-image {
    width: 38px;
    height: 38px;
    object-fit: contain;
    flex-shrink: 0;
}

.status-pill {
    padding: 3px 8px;
    background: rgba(255, 215, 0, 0.12);
    color: #FFD700;
    border-radius: 999px;
    display: inline-flex;
    width: fit-content;
    border: 1px solid rgba(255, 215, 0, 0.18);
}

.status-open {
    color: #555;
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.gold {
    background: #FFD700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.35);
}

.dot.gray {
    background: #3c3c3c;
}

.category-header {
    width: 100%;
    background: #111;
    color: #FFD700;
    padding: 12px;
    margin-top: 10px;
    border: 1px solid #222;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    border-radius: 10px;
    transition: background 0.18s ease;
}

.category-header:hover {
    background: #171717;
}

.category-content {
    display: none;
}

.category-content.active {
    display: block;
}

/* ================= MODALS ================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99990;
    padding: 20px;
}

.modal-content {
    background: #1e1e1e;
    width: 600px;
    max-width: 95%;
    border-radius: 10px;
    border: 1px solid #333;
    color: #fff;
}

.roster-modal {
    max-height: 90vh;
    overflow: hidden;
}

.modal-header {
    padding: 15px 18px;
    background: #252525;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body-scroll {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 70px);
}

.modal-input {
    width: 100%;
    background: #111;
    border: 1px solid #333;
    color: #fff;
    padding: 12px;
    margin-top: 6px;
    border-radius: 8px;
    font-family: inherit;
}

.modal-input:focus {
    outline: none;
    border-color: #FFD700;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    color: #FFD700;
    font-size: 0.9rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.gold-btn {
    background: #FFD700;
    color: #000;
    border: none;
    padding: 11px 16px;
    cursor: pointer;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.gold-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.cancel-btn,
.modal-btn {
    background: #333;
    color: #fff;
    border: none;
    padding: 11px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.18s ease, transform 0.15s ease;
}

.cancel-btn:hover,
.modal-btn:hover {
    background: #404040;
    transform: translateY(-1px);
}

.badge-tag {
    background: rgba(255, 215, 0, 0.14);
    color: #FFD700;
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    padding: 6px 10px;
    font-weight: 700;
    margin-right: 10px;
    display: inline-flex;
    align-items: center;
}

.header-rank {
    color: #fff;
    font-weight: 700;
}

.close-x {
    background: rgba(255,255,255,0.08);
    border: none;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    transition: background 0.18s ease;
}

.close-x:hover {
    background: rgba(255,255,255,0.16);
}

.member-search-results {
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    max-height: 260px;
    overflow-y: auto;
    margin-top: 8px;
}

.member-search-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #1f1f1f;
    padding: 12px;
    color: #fff;
    text-align: left;
    cursor: pointer;
}

.member-search-item:hover {
    background: #1a1a1a;
}

.member-search-empty {
    padding: 14px;
    color: #888;
}

.member-search-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.member-search-avatar-placeholder {
    background: #333;
}

.member-search-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.member-search-text strong {
    color: #fff;
}

.member-search-text span {
    color: #888;
    font-size: 0.85rem;
}

.selected-enroll-member {
    min-height: 64px;
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 10px;
}

.selected-member-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.overwrite-warning-box {
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.2);
    color: #FFD700;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.modal-profile {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 18px 20px 0;
}

.member-avatar {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 8px;
    background: #333;
}

.avatar-circle {
    width: 96px;
    height: 96px;
    border-radius: 8px;
    background: #333;
}

.profile-text h3 {
    margin: 0 0 8px;
    color: #fff;
}

.profile-text p {
    margin: 0;
    color: #bbb;
}

.member-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.member-notes-box {
    margin-top: 20px;
    padding: 16px;
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
}

.member-notes-box strong {
    color: #FFD700;
}

.member-notes-box p {
    color: #fff;
    margin-bottom: 0;
}

/* ================= CONTEXT MENU ================= */

.custom-context-menu {
    position: absolute;
    display: none;
    flex-direction: column;
    min-width: 220px;
    background: #111;
    border: 1px solid #333;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    z-index: 99999;
    overflow: hidden;
}

.context-menu-item {
    background: transparent;
    border: none;
    color: #FFD700;
    text-align: left;
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid #1f1f1f;
    font-family: inherit;
    font-size: 0.9rem;
}

.context-menu-item:last-child {
    border-bottom: none;
}

.context-menu-item:hover {
    background: #1a1a1a;
}

.context-menu-item.danger {
    color: #ff7b7b;
}

/* ================= MEMBER MODAL ================= */

.lssd-member-modal {
    width: 640px;
    max-width: 95%;
    background: linear-gradient(180deg, #1b1b1d 0%, #151517 100%);
    border: 1px solid #2e2e32;
    border-radius: 14px;
    overflow: hidden;
    color: #fff;
}

.lssd-member-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 18px 8px;
}

.lssd-member-topline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lssd-member-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 6px 18px 18px;
}

.lssd-member-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: #333;
    flex-shrink: 0;
}

.lssd-member-avatar.placeholder {
    background: #333;
}

.lssd-member-profile-text h3 {
    margin: 0 0 6px;
    font-size: 1.55rem;
    color: #fff;
}

.lssd-member-profile-text p {
    margin: 0;
    color: #b6b6b6;
    font-size: 0.95rem;
}

.lssd-member-tabs {
    display: flex;
    gap: 10px;
    padding: 0 18px 14px;
    flex-wrap: wrap;
}

.lssd-tab-btn {
    background: #2a2a2d;
    color: #aaa;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
}

.lssd-tab-btn.active {
    background: #3b3b3f;
    color: #FFD700;
    border: 1px solid rgba(255, 215, 0, 0.18);
}

.lssd-member-tab-content {
    padding: 0 18px 20px;
}

.lssd-action-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lssd-action-item {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: #1a1a1d;
    border: 1px solid #26262a;
    border-radius: 10px;
    color: #fff;
    padding: 16px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.lssd-action-item:hover {
    background: #202024;
    border-color: #39393d;
}

.lssd-action-item strong {
    display: block;
    margin-bottom: 4px;
    color: #FFD700;
    font-size: 1rem;
}

.lssd-action-item span {
    color: #b4b4b4;
    font-size: 0.9rem;
}

.lssd-action-arrow {
    font-size: 1.5rem;
    color: #FFD700;
    flex-shrink: 0;
}

.lssd-flags-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lssd-flag-row {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #18181b;
    border: 1px solid #26262a;
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    color: #fff;
}

.lssd-flag-row span:first-child {
    font-weight: 600;
    color: #FFD700;
}

.lssd-flag-toggle {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.lssd-toggle-slider {
    position: relative;
    width: 46px;
    height: 26px;
    background: #4a4a4a;
    border-radius: 999px;
    transition: 0.2s ease;
    flex-shrink: 0;
}

.lssd-toggle-slider::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #dcdcdc;
    border-radius: 50%;
    transition: 0.2s ease;
}

.lssd-flag-toggle:checked + .lssd-toggle-slider {
    background: #FFD700;
}

.lssd-flag-toggle:checked + .lssd-toggle-slider::before {
    transform: translateX(20px);
    background: #111;
}

.lssd-tab-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.lssd-empty-box {
    background: #18181b;
    border: 1px solid #26262a;
    border-radius: 10px;
    padding: 22px;
    text-align: center;
}

.lssd-empty-box h3 {
    margin: 0 0 8px;
    color: #FFD700;
}

.lssd-empty-box p {
    margin: 0;
    color: #aaa;
}

.lssd-strike-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lssd-strike-item {
    background: #18181b;
    border: 1px solid #26262a;
    border-radius: 10px;
    padding: 14px;
}

.lssd-strike-item strong {
    display: block;
    margin-bottom: 6px;
    color: #FFD700;
}

.lssd-strike-item p {
    margin: 0 0 6px;
    color: #fff;
}

.lssd-strike-item small {
    color: #999;
}

.lssd-notes-wrap {
    display: flex;
    flex-direction: column;
}

.lssd-notes-textarea {
    width: 100%;
    min-height: 160px;
    resize: vertical;
    background: #111;
    border: 1px solid #2b2b30;
    border-radius: 10px;
    color: #fff;
    padding: 14px;
    font-family: inherit;
    font-size: 0.95rem;
}

.lssd-notes-textarea:focus {
    outline: none;
    border-color: #FFD700;
}

/* ================= ANIMATIONS ================= */

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.modal-content,
.lssd-member-modal,
.roster-modal {
    animation: fadeIn 0.14s ease;
}

.lssd-strike-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.lssd-strike-actions {
    display: flex;
    gap: 8px;
}

.mini-dark-btn,
.mini-danger-btn {
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
}

.mini-dark-btn {
    background: #2d2d32;
    color: #fff;
}

.mini-dark-btn:hover {
    background: #3a3a40;
}

.mini-danger-btn {
    background: rgba(255, 90, 90, 0.18);
    color: #ff9c9c;
    border: 1px solid rgba(255, 90, 90, 0.25);
}

.mini-danger-btn:hover {
    background: rgba(255, 90, 90, 0.28);
}

/* ================= CUSTOM POPUPS ================= */

.custom-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 20px;
}

.custom-popup-box {
    width: 520px;
    max-width: 95%;
    background: linear-gradient(180deg, #1b1b1d 0%, #151517 100%);
    border: 1px solid #2e2e32;
    border-radius: 14px;
    color: #fff;
    overflow: hidden;
    animation: fadeIn 0.14s ease;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.custom-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px 10px;
    border-bottom: 1px solid #26262a;
}

.custom-popup-header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #FFD700;
}

.custom-popup-body {
    padding: 18px;
}

.custom-popup-text {
    margin: 0;
    color: #e6e6e6;
    line-height: 1.5;
}

.custom-popup-label {
    display: block;
    margin-bottom: 8px;
    color: #FFD700;
    font-size: 0.9rem;
}

.custom-popup-input {
    width: 100%;
    background: #111;
    border: 1px solid #333;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
}

.custom-popup-input:focus {
    outline: none;
    border-color: #FFD700;
}

.custom-popup-textarea {
    min-height: 120px;
    resize: vertical;
}

.custom-popup-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 18px 18px;
}

/* ================= SHIFTS ================= */

.shift-list {
    display: grid;
    gap: 18px;
}

.shift-card {
    background: #141414;
    border: 1px solid #262626;
    border-left: 4px solid #FFD700;
    border-radius: 10px;
    padding: 18px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.shift-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.shift-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.shift-card-header h2 {
    margin: 0 0 6px;
    color: #fff;
}

.shift-meta {
    color: #a9a9a9;
    font-size: 0.92rem;
}

.shift-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.small-btn {
    padding: 9px 12px;
    font-size: 0.85rem;
}

.danger-btn {
    border-color: #5a2626;
    color: #ff9c9c;
}

.shift-section-title {
    font-weight: 700;
    color: #FFD700;
    margin-bottom: 10px;
}

.shift-sergeant-box,
.shift-members-box {
    background: #101010;
    border: 1px solid #202020;
    border-radius: 8px;
    padding: 14px;
    margin-top: 14px;
}

.shift-person-row,
.shift-member-table-head,
.shift-member-table-row {
    display: grid;
    grid-template-columns: 2fr 1.1fr 0.9fr 1.2fr;
    gap: 12px;
    align-items: center;
}

.shift-member-table-head,
.shift-member-table-row {
    grid-template-columns: 1fr 1.6fr 1fr 1fr 1.1fr;
}

.shift-member-table-head {
    color: #7f7f7f;
    font-size: 0.8rem;
    padding-bottom: 8px;
    border-bottom: 1px solid #202020;
}

.shift-member-table-row {
    padding: 10px 0;
    border-bottom: 1px solid #1c1c1c;
    color: #e8e8e8;
}

.shift-member-table-row:last-child {
    border-bottom: none;
}

.shift-person-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #e8e8e8;
}

.shift-person-main span,
.shift-empty-box-inner,
.shift-empty-inline {
    color: #b8b8b8;
}

.shift-person-status {
    display: inline-flex;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    border: 1px solid #333;
}

.shift-person-status.on-duty {
    color: #8cffac;
    border-color: #244b2e;
    background: rgba(36, 75, 46, 0.25);
}

.shift-person-status.off-duty {
    color: #c9c9c9;
    border-color: #3c3c3c;
    background: rgba(60, 60, 60, 0.2);
}

.shift-person-status.excused {
    background: rgba(220, 53, 69, 0.18);
    color: #ff808f;
    border: 1px solid rgba(220, 53, 69, 0.35);
    font-weight: 700;
}

.shift-person-status.expired-excuse {
    background: rgba(120, 120, 120, 0.18);
    color: #b8b8b8;
    border: 1px solid rgba(160, 160, 160, 0.35);
    font-weight: 700;
}

.shift-person-status.upcoming-excuse {
    background: rgba(255, 193, 7, 0.14);
    color: #ffd666;
    border: 1px solid rgba(255, 193, 7, 0.28);
    font-weight: 700;
}

.shift-person-station {
    color: #e8e8e8;
}

.shift-empty-inline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.shift-form-grid {
    display: grid;
    gap: 14px;
}

.shifts-empty-box {
    color: #ddd;
}

/* ================= LEADERBOARD ================= */

.leaderboard-card {
    background: rgba(12, 12, 12, 0.95);
    border: 1px solid rgba(255, 215, 0, 0.18);
    border-left: 3px solid #ffd43b;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.leaderboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.leaderboard-table-header,
.leaderboard-row {
    display: grid;
    grid-template-columns: 100px 1.8fr 180px 160px;
    gap: 16px;
    align-items: center;
    padding: 14px 18px;
}

.leaderboard-table-header {
    color: #d6d6d6;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.leaderboard-row {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.leaderboard-row:last-child {
    border-bottom: none;
}

.leaderboard-rank {
    color: #ffd43b;
    font-weight: 700;
}

.leaderboard-name strong {
    color: #ffffff;
}

.leaderboard-time {
    color: #d8d8d8;
    white-space: nowrap;
}

.leaderboard-actions {
    display: flex;
    justify-content: flex-start;
}

.leaderboard-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 60vh;
    overflow-y: auto;
}

.leaderboard-history-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 12px;
}

.leaderboard-history-title {
    font-weight: 700;
    color: #ffd43b;
    margin-bottom: 6px;
}

.leaderboard-history-meta,
.leaderboard-history-winner {
    color: #cfcfcf;
    margin-bottom: 4px;
}

.leaderboard-history-top3 {
    margin-top: 8px;
    color: #ffffff;
    line-height: 1.5;
}

/* ================= EXCUSES ================= */

.excuse-reason {
    color: #f1f1f1;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* ================= SUPERVISE ================= */

.supervise-start-panel,
.supervise-active-panel {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 18px;
    background: rgba(12, 12, 12, 0.95);
    border: 1px solid rgba(255, 215, 0, 0.18);
    border-left: 3px solid #ffd43b;
    border-radius: 14px;
    padding: 32px;
}

.supervise-start-btn {
    width: 100%;
    min-height: 220px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 212, 59, 0.16), rgba(255, 212, 59, 0.08));
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.supervise-start-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.supervise-active-label {
    font-size: 18px;
    color: #d6d6d6;
    font-weight: 700;
}

.supervise-timer {
    font-size: 72px;
    line-height: 1;
    font-weight: 800;
    color: #ffd43b;
    letter-spacing: 2px;
}

.supervise-table-header,
.supervise-row {
    grid-template-columns: 180px 1.8fr 180px;
}

/* ================= OIS ================= */

.ois-report-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ois-report-card {
    background: rgba(12, 12, 12, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid #ff4d4f;
    border-radius: 12px;
    padding: 18px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.ois-report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.ois-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ois-report-header h2 {
    margin: 0;
    font-size: 24px;
}

.ois-report-date {
    color: #c9c9c9;
    font-size: 14px;
}

.ois-report-meta {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    color: #f0f0f0;
}

.ois-report-section {
    margin-top: 16px;
}

.ois-report-section h3 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 16px;
}

.ois-report-text {
    white-space: pre-wrap;
    line-height: 1.55;
    color: #e5e5e5;
}

.ois-report-text a {
    color: #7aa7ff;
    word-break: break-all;
}

.ois-toolbar {
    margin-bottom: 16px;
}

.ois-toolbar .custom-popup-input {
    max-width: 420px;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .dashboard-grid,
    .dashboard-grid-operations {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .shift-card-header,
    .shift-empty-inline,
    .shift-person-row,
    .shift-member-table-head,
    .shift-member-table-row {
        grid-template-columns: 1fr;
        display: grid;
    }

    .leaderboard-table-header,
    .leaderboard-row,
    .supervise-table-header,
    .supervise-row {
        grid-template-columns: 1fr;
    }

    .member-info-grid {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 20px;
    }
}

.settings-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
}

.settings-card {
    background: #141414;
    border: 1px solid #222;
    border-left: 4px solid #FFD700;
    border-radius: 10px;
    padding: 20px;
}

.settings-card h2 {
    margin-top: 0;
    color: #FFD700;
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
}