* {
    box-sizing: border-box;
}


:root {
    --bg: #0b0b0d;
    --card: #131316;
    --card-hover: #18181c;
    --border: #25252b;

    --text: #f4f4f5;
    --muted: #85858f;

    --accent: #ffffff;
    --accent-text: #080808;

    --green: #62d98b;
    --yellow: #e7c66a;
    --red: #e76b6b;
}


html,
body {
    margin: 0;
    min-height: 100%;

    background: var(--bg);
    color: var(--text);

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


body {
    min-height: 100vh;
}


button,
input {
    font: inherit;
}


button {
    cursor: pointer;
}


.hidden {
    display: none !important;
}


.app {
    width: min(900px, calc(100% - 32px));
    margin: 0 auto;
    padding-bottom: 60px;
}


/* header */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 28px 0;

    border-bottom: 1px solid var(--border);
}


.logo {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.7px;
}


.subtitle {
    margin-top: 3px;

    color: var(--muted);

    font-size: 13px;
}


.user-box {
    display: flex;
    align-items: center;
    gap: 12px;

    color: var(--muted);

    font-size: 14px;
}


/* screens */

.screen {
    padding-top: 60px;
}


/* register */

.register-card {
    width: min(430px, 100%);

    margin: 80px auto 0;

    padding: 34px;

    background: var(--card);

    border: 1px solid var(--border);
    border-radius: 18px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3);
}


.icon {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 22px;

    border-radius: 13px;

    background: white;
    color: black;

    font-weight: 800;
    font-size: 20px;
}


.register-card h1 {
    margin: 0 0 8px;

    font-size: 28px;
    letter-spacing: -1px;
}


.register-card p {
    margin: 0 0 28px;

    color: var(--muted);

    line-height: 1.5;
}


.register-card form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


input {
    width: 100%;

    padding: 14px 15px;

    outline: none;

    color: var(--text);
    background: #0d0d10;

    border: 1px solid var(--border);
    border-radius: 10px;

    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}


input:focus {
    border-color: #55555f;

    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.04);
}


.primary-button {
    padding: 14px;

    border: 0;
    border-radius: 10px;

    background: var(--accent);
    color: var(--accent-text);

    font-weight: 600;

    transition:
        transform 0.15s,
        opacity 0.15s;
}


.primary-button:hover {
    opacity: 0.9;
}


.primary-button:active {
    transform: scale(0.98);
}


.error {
    margin-top: 15px;

    padding: 12px;

    border-radius: 9px;

    background: rgba(231, 107, 107, 0.1);

    color: var(--red);

    font-size: 14px;
}


/* page */

.page-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    margin-bottom: 28px;
}


.page-title h1 {
    margin: 0;

    font-size: 32px;
    letter-spacing: -1px;
}


.page-title p {
    margin: 6px 0 0;

    color: var(--muted);

    font-size: 14px;
}


.connection-status {
    display: flex;
    align-items: center;
    gap: 7px;

    color: var(--muted);

    font-size: 13px;
}


.connection-status span {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--green);

    box-shadow:
        0 0 8px rgba(98, 217, 139, 0.5);
}


.connection-status.offline span {
    background: var(--red);

    box-shadow: none;
}


/* queue */

.queue-card {
    margin-bottom: 18px;

    background: var(--card);

    border: 1px solid var(--border);
    border-radius: 16px;

    overflow: hidden;
}


.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 18px 20px;

    border-bottom: 1px solid var(--border);
}


.queue-title {
    font-size: 16px;
    font-weight: 650;
}


.queue-id {
    margin-top: 3px;

    color: var(--muted);

    font-size: 12px;
    font-family: monospace;
}


.queue-body {
    padding: 5px 20px 20px;
}


.queue-empty {
    padding: 25px 0;

    color: var(--muted);

    text-align: center;
}


/* entries */

.entry {
    display: grid;

    grid-template-columns:
        35px
        minmax(0, 1fr)
        auto;

    align-items: center;

    gap: 12px;

    min-height: 62px;

    border-bottom: 1px solid var(--border);
}


.entry:last-child {
    border-bottom: 0;
}


.position {
    color: var(--muted);

    font-size: 13px;
    font-variant-numeric: tabular-nums;
}


.entry-name {
    min-width: 0;

    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 15px;
}


.entry-name.me {
    font-weight: 650;
}


.entry-name.me::after {
    content: " ты";

    margin-left: 6px;

    color: var(--muted);

    font-size: 11px;
    font-weight: 400;
}


.entry-status {
    padding: 6px 9px;

    border-radius: 7px;

    font-size: 12px;
}


.entry-status.waiting {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
}


.entry-status.confirming {
    color: var(--yellow);
    background: rgba(231, 198, 106, 0.1);
}


.entry-status.active {
    color: var(--green);
    background: rgba(98, 217, 139, 0.1);
}


/* actions */

.queue-actions {
    display: flex;
    gap: 8px;

    margin-top: 15px;
}


.action-button {
    padding: 10px 13px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: transparent;
    color: var(--text);

    font-size: 13px;
}


.action-button:hover {
    background: var(--card-hover);
}


.action-button.danger {
    color: var(--red);
}


.action-button.confirm {
    color: var(--green);

    border-color: rgba(98, 217, 139, 0.25);
}


/* empty */

.empty {
    padding: 70px 20px;

    text-align: center;
}


.empty-icon {
    margin-bottom: 15px;

    color: var(--muted);

    font-size: 40px;
}


.empty h2 {
    margin: 0 0 8px;

    font-size: 20px;
}


.empty p {
    margin: 0;

    color: var(--muted);
}


/* buttons */

.ghost-button {
    padding: 7px 10px;

    border: 1px solid var(--border);
    border-radius: 7px;

    background: transparent;
    color: var(--muted);

    font-size: 12px;
}


.ghost-button:hover {
    color: var(--text);
    background: var(--card);
}


/* toast */

.toast {
    position: fixed;

    left: 50%;
    bottom: 25px;

    transform: translateX(-50%);

    padding: 12px 16px;

    border: 1px solid var(--border);
    border-radius: 9px;

    background: #19191d;

    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.4);

    font-size: 14px;
}


@media (max-width: 600px) {

    .app {
        width: min(100% - 20px, 900px);
    }

    .header {
        padding: 20px 0;
    }

    .screen {
        padding-top: 30px;
    }

    .register-card {
        margin-top: 30px;

        padding: 25px;
    }

    .page-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .entry {
        grid-template-columns:
            28px
            minmax(0, 1fr);
    }

    .entry-status {
        grid-column: 2;
        width: fit-content;
    }

}
.personal-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;

    margin: 15px 0;
    padding: 15px;

    background: #101014;
    border: 1px solid var(--border);
    border-radius: 11px;
}

.personal-info div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.personal-info span {
    color: var(--muted);
    font-size: 11px;
}

.personal-info strong {
    font-size: 14px;
}

.entry-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.entry-time {
    font-family: monospace;
    font-size: 11px;
}

.active-time {
    color: var(--green);
}

.confirming-time {
    color: var(--yellow);
}

.active-panel,
.confirm-panel {
    margin: 15px 0;
    padding: 18px;

    border-radius: 11px;

    text-align: center;
}

.active-panel {
    background: rgba(98, 217, 139, 0.07);
    border: 1px solid rgba(98, 217, 139, 0.15);
}

.confirm-panel {
    background: rgba(231, 198, 106, 0.07);
    border: 1px solid rgba(231, 198, 106, 0.15);
}

.active-panel div,
.confirm-panel div {
    margin-bottom: 8px;

    font-size: 13px;
}

.active-panel strong,
.confirm-panel strong {
    display: block;

    font-family: monospace;
    font-size: 30px;
}

.active-panel span,
.confirm-panel span {
    color: var(--muted);

    font-size: 12px;
}

.queue-average {
    color: var(--muted);
    font-size: 11px;
}

.history-section {
    margin-top: 55px;
}

.history-section h2 {
    margin: 0;

    font-size: 22px;
}

.history-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 20px;
    align-items: center;

    padding: 15px 0;

    border-bottom: 1px solid var(--border);

    font-size: 13px;
}

.history-item div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-item span {
    color: var(--muted);
    font-size: 11px;
}

.history-status {
    color: var(--muted);
}

.history-empty {
    padding: 20px 0;

    color: var(--muted);
}


@media (max-width: 600px) {

    .personal-info {
        grid-template-columns: 1fr 1fr;
    }

    .history-item {
        grid-template-columns: 1fr auto;
    }

    .history-status {
        grid-column: 2;
    }
}