html,
body {
    min-height: 100%;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(40, 165, 245, 0.16), transparent 30%),
        radial-gradient(circle at bottom right, rgba(30, 135, 240, 0.1), transparent 25%),
        linear-gradient(180deg, #f7fbfe 0%, #eef3f7 100%);
}

body {
    color: #1f2933;
}

input[type="file"] {
    display: none;
}

.tm-navbar-container {
    background: linear-gradient(135deg, #28a5f5, #1e87f0) !important;
    box-shadow: 0 10px 30px rgba(30, 135, 240, 0.18);
}

.uk-logo,
.uk-logo:hover,
.uk-logo:active,
.uk-logo:visited {
    color: #ffffff;
}

.toolbarButton {
    min-height: auto !important;
    padding: 0 12px !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
}

.uploadLabel {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

.menuInfoItem {
    white-space: nowrap;
    padding: 5px 0;
    color: #6b7280;
}

.chunk-range {
    display: inline-block;
    margin-top: 2px;
    font-size: 0.75rem;
    color: #94a3b8;
}

.section-shell {
    padding-top: 32px;
    padding-bottom: 32px;
}

.panel-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
}

.hero-card {
    overflow: hidden;
}

.hero-card .uk-flex-between {
    align-items: center;
    gap: 24px;
    margin-bottom: 28px;
}

.eyebrow {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    color: #1e87f0;
    font-weight: 700;
}

.room-subtitle {
    max-width: 28rem;
}

#roomHeading {
    white-space: nowrap;
    text-overflow: ellipsis;
}

.qr-shell {
    flex: 0 0 auto;
    width: 160px;
    min-width: 160px;
    min-height: 160px;
    margin-bottom: 30px;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #eee;
    box-shadow: 4.0px 8.0px 8.0px #ddd;
}

.qr-shell img,
.qr-shell canvas {
    display: block;
    width: 100%;
    height: auto;
}

.stat-card {
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.95));
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.stat-card strong {
    display: block;
    margin-top: 6px;
    color: #111827;
}

.stat-label {
    display: block;
    font-size: 0.78rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.share-card {
    margin-top: 24px;
}

.telemetry-card {
    margin-top: 24px;
}

.telemetry-header {
    gap: 16px;
}

.telemetry-chart-block {
    margin-top: 22px;
}

.chart-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.chart-title {
    margin: 0;
    font-size: 1rem;
    color: #0f172a;
}

.chart-rate {
    color: #1e87f0;
    font-size: 0.95rem;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.05);
    color: #475569;
    font-size: 0.72rem;
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.smoothie-chart {
    width: 100%;
    height: 180px;
    border-radius: 0;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.98));
}

.chart-note {
    margin: 8px 0 0;
}

.upload-history-empty {
    padding: 20px 18px;
    border: 1px dashed rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0.98));
    color: #64748b;
}

.upload-history-list {
    display: grid;
    gap: 12px;
}

.upload-history-item {
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 0.98));
}

.upload-history-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.upload-history-file {
    margin: 0;
    font-size: 0.98rem;
    color: #0f172a;
    word-break: break-word;
}

.upload-history-receiver {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.84rem;
}

.upload-history-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(30, 135, 240, 0.1);
    color: #1e87f0;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}

.upload-history-status.status-uploaded {
    background: rgba(50, 210, 150, 0.14);
    color: #0f9f6e;
}

.upload-history-status.status-uploading {
    background: rgba(30, 135, 240, 0.1);
    color: #1e87f0;
}

.upload-history-status.status-failed,
.upload-history-status.status-aborted {
    background: rgba(240, 80, 110, 0.12);
    color: #c81e4d;
}

.upload-history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.upload-history-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: #334155;
    font-size: 0.78rem;
}

.upload-history-range {
    margin-top: 12px;
    color: #64748b;
    font-size: 0.8rem;
    word-break: break-word;
}

.upload-action {
    margin-top: 16px;
}

.uploadCta {
    width: 100%;
    justify-content: center;
    white-space: nowrap;
}

.drop-zone {
    padding: 28px 24px;
    border: 2px dashed rgba(30, 135, 240, 0.35);
    border-radius: 18px;
    text-align: center;
    background: linear-gradient(180deg, rgba(219, 234, 254, 0.45), rgba(255, 255, 255, 0.8));
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.drop-zone-icon {
    color: #1e87f0;
}

.preview-drop {
    border-color: #1e87f0;
    box-shadow: 0 14px 30px rgba(30, 135, 240, 0.14);
    transform: translateY(-2px);
}

.status-banner {
    border-radius: 14px;
}

.list-toolbar {
    gap: 16px;
}

.identity-bar {
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.95));
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.identity-label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.78rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

#myNameDisplay {
    display: block;
    font-size: 1rem;
    color: #111827;
}

.menuButton {
    min-height: 80px !important;
}

.empty-state {
    padding: 56px 24px;
    text-align: center;
    color: #64748b;
    border: 1px dashed rgba(148, 163, 184, 0.25);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0.95));
}

.files-shell {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.files-table {
    margin-bottom: 0;
    min-width: 560px;
}

.files-table thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    white-space: nowrap;
}

.files-table td {
    white-space: nowrap;
}

.file-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.file-link:hover {
    color: #1e87f0;
    text-decoration: none;
}

.file-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.media-link {
    cursor: pointer;
}

.media-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    color: #64748b;
    background: rgba(15, 23, 42, 0.06);
    text-decoration: none;
}

.media-download:hover {
    color: #1e87f0;
    text-decoration: none;
    background: rgba(30, 135, 240, 0.12);
}

.share-chip,
.size-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
}

.share-chip {
    background: rgba(30, 135, 240, 0.08);
    color: #1e87f0;
    font-weight: 600;
}

.size-pill {
    background: rgba(15, 23, 42, 0.06);
    color: #334155;
}

.share-modal p:last-child {
    margin-bottom: 0;
}

@media (max-width: 959px) {
    .hero-card .uk-flex-between {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .share-card {
        margin-top: 20px;
    }

    .telemetry-card {
        margin-top: 20px;
    }
}

@media (max-width: 639px) {
    .section-shell {
        padding-top: 18px;
    }

    .panel-card {
        border-radius: 16px;
    }

    .drop-zone,
    .empty-state {
        padding-left: 16px;
        padding-right: 16px;
    }

    .file-link {
        gap: 0.45rem;
        align-items: flex-start;
    }

    .identity-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .chart-heading-row,
    .telemetry-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .chart-legend {
        justify-content: flex-start;
    }

    .upload-history-top {
        flex-direction: column;
    }

    #roomHeading {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
}
