*,
*::before,
*::after {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    background: #f5f5f5;
    color: #333;
    font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

h1, h2, h3, h4 {
    line-height: 1.25;
}

.muted {
    color: #888;
}

.error {
    color: #a94442;
    margin: 12px 0 0;
}

label {
    display: block;
    font-weight: 600;
    margin: 12px 0 4px;
}

input[type="text"],
input[type="password"],
input[type="date"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font: inherit;
}

input[type="file"] {
    font: inherit;
}

.btn {
    display: inline-block;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #333;
    padding: 8px 16px;
    font: inherit;
    cursor: pointer;
}

.btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.btn-primary {
    background: #cd1713;
    border-color: #cd1713;
    color: #fff;
    margin-top: 16px;
}

.btn-small {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

.center {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.card {
    width: 100%;
    max-width: 360px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 28px;
}

.card h1 {
    font-size: 22px;
    margin: 12px 0 4px;
}

.logo {
    max-width: 170px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 10px 20px;
}

.topbar-logo {
    height: 34px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.shell {
    display: flex;
    min-height: calc(100vh - 55px);
}

.sidebar {
    width: 210px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e5e5e5;
    padding: 14px 10px;
}

.sidebar-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
    margin: 12px 10px 6px;
}

.nav-item {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    border-radius: 4px;
    padding: 8px 10px;
    color: #333;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.nav-item:hover {
    background: #f2f2f2;
}

.nav-item.active {
    background: #cd1713;
    color: #fff;
}

.main {
    flex: 1;
    min-width: 0;
    padding: 24px 28px 60px;
}

.main h2 {
    margin-top: 0;
    font-size: 22px;
}

.main h3 {
    font-size: 16px;
    margin-top: 32px;
}

.form {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 6px 20px 18px;
    max-width: 720px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.progress {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    max-width: 720px;
}

.progress li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    padding: 6px 2px;
    border-bottom: 1px solid #eee;
}

.progress .is-error {
    color: #a94442;
}

.progress .is-done {
    color: #3c763d;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}

.tile {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
}

.tile img {
    display: block;
    width: 100%;
    height: 130px;
    object-fit: cover;
    background: #eee;
}

.tile-body {
    padding: 8px 10px;
    font-size: 12px;
}

.tile-body p {
    margin: 0 0 6px;
    min-height: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audio-list {
    max-width: 820px;
}

.audio-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 10px;
}

.audio-meta {
    flex: 1;
    min-width: 0;
}

.audio-meta h4 {
    font-size: 15px;
    margin: 0 0 4px;
}

.audio-meta p {
    margin: 0;
    font-size: 13px;
    color: #777;
}

.audio-item audio {
    width: 260px;
    max-width: 100%;
}

@media (max-width: 767px) {
    .shell {
        flex-direction: column;
    }

    .sidebar {
        width: auto;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        border-right: 0;
        border-bottom: 1px solid #e5e5e5;
        padding: 8px;
    }

    .sidebar-label {
        display: none;
    }

    .nav-item {
        width: auto;
    }

    .main {
        padding: 18px 14px 40px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .topbar-user span {
        display: none;
    }

    .audio-item {
        flex-wrap: wrap;
    }

    .audio-item audio {
        width: 100%;
    }
}
