:root {
    color-scheme: dark;
}

body {
    background-color: #0f172a;
    color: #d1d5db;
}

.animate-marquee {
    display: inline-flex;
    align-items: center;
    animation: marquee-scroll 20s linear infinite;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

[data-nav-menu] {
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    overscroll-behavior: contain;
}

.table-minelab th {
    background-color: rgba(30, 41, 59, 0.85);
    color: #9ca3af;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
}

.table-minelab td {
    background-color: rgba(15, 23, 42, 0.4);
    padding: 0.75rem 1rem;
}

@media (max-width: 640px) {
    .table-minelab {
        border-collapse: separate;
        border-spacing: 0;
    }

    .table-minelab thead {
        display: none;
    }

    .table-minelab tbody tr {
        display: block;
        background-color: rgba(15, 23, 42, 0.65);
        border: 1px solid rgba(55, 65, 81, 0.55);
        border-radius: 1rem;
        padding: 0.75rem 1rem;
        margin-bottom: 1rem;
    }

    .table-minelab tbody tr:last-child {
        margin-bottom: 0;
    }

    .table-minelab tbody td {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 1rem;
        width: 100%;
        padding: 0.5rem 0;
        background-color: transparent;
        border: 0;
    }

    .table-minelab tbody td::before {
        content: attr(data-label);
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #9ca3af;
        flex: 0 0 auto;
    }

    .table-minelab tbody td > * {
        margin: 0;
    }

    .table-minelab tbody td:last-child {
        padding-bottom: 0;
    }
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: rgba(30, 41, 59, 0.6);
    color: #d1d5db;
}

.badge-success {
    background-color: rgba(34, 197, 94, 0.15);
    color: #86efac;
}

.badge-warning {
    background-color: rgba(234, 179, 8, 0.15);
    color: #fcd34d;
}

.badge-danger {
    background-color: rgba(248, 113, 113, 0.15);
    color: #fca5a5;
}

.badge-info {
    background-color: rgba(59, 130, 246, 0.15);
    color: #bfdbfe;
}

.action-menu {
    position: relative;
    display: inline-block;
    text-align: left;
}

.action-menu summary {
    list-style: none;
    cursor: pointer;
}

.action-menu summary::-webkit-details-marker {
    display: none;
}

.action-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
    background: rgba(234, 179, 8, 0.1);
    color: #facc15;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid rgba(234, 179, 8, 0.25);
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.action-menu-trigger:hover,
.action-menu[open] .action-menu-trigger {
    background: rgba(234, 179, 8, 0.2);
    color: #fef08a;
    border-color: rgba(234, 179, 8, 0.45);
}

.action-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    min-width: 13rem;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(55, 65, 81, 0.6);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
    border-radius: 0.75rem;
    padding: 0.5rem;
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.action-menu[open] .action-menu-panel {
    animation: action-menu-fade 120ms ease;
}

.action-menu-link,
.action-menu-button {
    display: block;
    width: 100%;
    padding: 0.45rem 0.75rem;
    border-radius: 0.6rem;
    font-size: 0.8rem;
    text-align: left;
    background: transparent;
    color: #e5e7eb;
    transition: background-color 120ms ease, color 120ms ease;
}

.action-menu-link:hover,
.action-menu-button:hover {
    background: rgba(148, 163, 184, 0.12);
    color: #f8fafc;
}

.action-menu-button {
    border: 0;
    cursor: pointer;
    font-weight: 500;
}

.action-menu-form {
    margin: 0;
}

@keyframes action-menu-fade {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
