:root {
    --bg: #0f1424;
    --bg-2: #12182b;
    --card: #171e33;
    --text: #e8ecff;
    --muted: #a7b2d8;
    --accent: #4aa3ff;
    --accent-2: #7cc0ff;
    --border: #233057;
    --ok: #3ddc97;
    --warn: #ffd166;
    --danger: #ff6b6b;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --radius: 14px;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, sans-serif;
    background: linear-gradient(180deg, var(--bg) 0%, #0d1120 100%);
    color: var(--text);
}

/* Header */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(15, 20, 36, .95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    height: 60px;
    box-sizing: border-box;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: .5px
}

.logo {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: var(--shadow);
}

.grow {
    flex: 1
}

.search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-2);
    color: var(--muted);
    min-width: 260px;
    max-width: 520px;
    width: 100%;
}

.search input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    outline: none
}

.kbd {
    border: 1px solid var(--border);
    border-bottom-color: #1b274c;
    border-right-color: #1b274c;
    padding: 1px 6px;
    border-radius: 6px;
    color: var(--muted);
    font-size: 12px
}

.btn {
    background: var(--accent);
    color: #051225;
    border: none;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.btn.secondary {
    background: #1a2444;
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2a3766;
    display: inline-block
}

/* Layout */
.app {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 100px);
    margin-top: 100px;
    gap: 14px;
    padding: 14px 18px;
}

aside,
.context,
main {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-height: 68vh;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

aside,
.context {
    padding: 12px
}

main {
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden
}

.section-title {
    margin: 6px 8px 10px;
    font-size: 12px;
    letter-spacing: .1em;
    color: var(--muted);
    text-transform: uppercase
}

.list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px
}

.item {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    background: #121a34;
    display: flex;
    gap: 10px;
    align-items: center;
    cursor: pointer;
}

.item:hover {
    border-color: #2a3b6e;
    background: #152042
}

.item .badge {
    margin-left: auto;
    font-size: 12px;
    color: var(--muted)
}

.pill {
    font-size: 11px;
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted)
}

.tree {
    padding: 6px
}

.tree details {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px 8px;
    margin: 6px 0;
    background: #121a34
}

.tree summary {
    cursor: pointer;
    color: #dbe5ff;
    font-weight: 600
}

.tree .leaf {
    padding: 6px 10px;
    margin: 6px 0;
    border-radius: 8px;
    background: #0f1731;
    border: 1px dashed #2a3b6e;
    cursor: pointer
}

.tree .leaf.active {
    border-style: solid;
    background: #0e1b42
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: #0f1424
}

.crumb {
    color: var(--muted);
    font-size: 14px
}

.crumb a {
    color: #cfe1ff;
    text-decoration: none
}

.crumb.sep {
    opacity: .4
}

/* Main content */
.content {
    flex: 1;
    overflow: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
}

.topic-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px
}

.topic-title {
    font-size: 20px;
    font-weight: 700
}

.topic-desc {
    color: var(--muted)
}

.flex {
    display: flex;
    gap: 14px
}

.player {
    flex: 2;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: #0b1020
}

video {
    width: 100%;
    height: 360px;
    background: #000
}

.playlist {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    background: #121a34;
    max-height: 420px;
    overflow: auto
}

.vrow {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 8px;
    cursor: pointer
}

.vrow.active {
    border-color: var(--accent);
    background: #0e1b42
}

.actions {
    display: flex;
    gap: 8px;
    margin-top: 10px
}

.actions .btn {
    padding: 8px 10px
}

.meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 13px
}

/* Footer actions */
.footer-actions {
    border-top: 1px solid var(--border);
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0f1424;
    margin-top: auto;
}

/* Command palette (Ctrl+K) */
.palette {
    position: fixed;
    inset: 0;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    background: rgba(0, 0, 0, .45);
    z-index: 60
}

.palette .box {
    width: min(720px, 92vw);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden
}

.palette .box header {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 8px;
    align-items: center
}

.palette .box header input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 16px
}

.palette .results {
    max-height: 50vh;
    overflow: auto
}

.palette .row {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    cursor: pointer
}

.palette .row:hover {
    background: #141d3b
}

.palette .hint {
    padding: 8px 14px;
    color: var(--muted);
    font-size: 12px
}

/* Bottom navigation (mobile) */
.bottom-nav {
    display: none
}

.bottom-nav .tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
    padding: 8px 4px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.bottom-nav .tab.active {
    color: var(--accent);
    background: rgba(74, 163, 255, 0.1);
}

.bottom-nav .tab-icon {
    font-size: 18px;
    line-height: 1;
}

.bottom-nav .tab-label {
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Bottom-sheet player (mobile) */
.sheet {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card);
    border-top: 1px solid var(--border);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, .4);
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    z-index: 55;
}

.sheet .handle {
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center
}

.sheet .handle::before {
    content: "";
    width: 56px;
    height: 4px;
    border-radius: 999px;
    background: #2a3b6e
}

.sheet .inner {
    padding: 10px 12px
}

.sheet video {
    height: 200px
}

/* Responsive */
@media (max-width: 1100px) {
    .app {
        grid-template-columns: 240px 1fr
    }

    .context {
        display: none
    }
}

@media (max-width: 880px) {
    .app {
        display: flex;
        flex-direction: column;
        padding: 0px 12px 40px;
        margin-bottom: 80px;
        /* Space for bottom nav */
    }

    aside {
        display: none
    }

    .breadcrumb {
        display: none
    }

    /* Mobile breadcrumb alternative */
    .mobile-nav-indicator {
        display: block;
        padding: 12px 16px;
        background: #0f1424;
        border-bottom: 1px solid var(--border);
        font-size: 14px;
        color: var(--muted);
    }

    .content {
        padding: 10px
    }

    .flex {
        flex-direction: column
    }

    .playlist {
        max-height: none
    }

    .bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        background: var(--card);
        border-top: 1px solid var(--border);
        gap: 6px;
        justify-content: space-around;
        padding: 8px;
        z-index: 50;
        backdrop-filter: blur(8px);
    }

    .sheet {
        display: block
    }

    .player {
        display: none
    }

    /* Mobile-specific improvements */
    .item {
        padding: 12px;
        margin-bottom: 8px;
    }

    .section-title {
        margin: 12px 8px 8px;
        font-size: 14px;
    }

    .topic-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .topic-title {
        font-size: 18px;
    }

    /* Books responsive */
    .books-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .book-card {
        margin-bottom: 0;
    }

    .book-card-content {
        padding: 12px;
    }

    .book-meta {
        gap: 4px;
    }

    .book-materia,
    .book-nivel,
    .book-grado {
        font-size: 9px;
        padding: 1px 4px;
    }

    .book-progress-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .book-progress {
        width: 100%;
    }

    .books-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .books-actions {
        align-self: flex-end;
    }

    .book-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .book-row-progress {
        width: 100%;
        min-width: auto;
    }

    .book-row-actions {
        width: 100%;
        justify-content: space-between;
    }

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

    .modal-content {
        max-height: calc(100vh - 40px);
    }

    .books-header {
        align-items: start !important;
    }
}

/* Progress View Styles */
.progress-summary {
    padding: 16px;
}

.progress-card {
    background: #121a34;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.progress-card h3 {
    margin: 0 0 12px 0;
    color: var(--text);
    font-size: 16px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #1a2444;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    color: var(--muted);
    font-size: 14px;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.stat {
    text-align: center;
    padding: 16px;
    background: #121a34;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.stat-label {
    color: var(--muted);
    font-size: 12px;
}

/* Recent Activity Styles */
.recent-activity {
    padding: 16px;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    background: #121a34;
    cursor: pointer;
    transition: all 0.2s ease;
}

.recent-item:hover {
    border-color: var(--accent);
    background: #152042;
}

.recent-icon {
    font-size: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 163, 255, 0.1);
    border-radius: 8px;
}

.recent-content {
    flex: 1;
}

.recent-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.recent-time {
    color: var(--muted);
    font-size: 12px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
    font-style: italic;
}

/* Account View Styles */
.account-info {
    padding: 16px;
}

.profile-card {
    text-align: center;
    padding: 24px;
    background: #121a34;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 20px;
}

.avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    margin: 0 auto 16px;
    box-shadow: var(--shadow);
}

.profile-card h3 {
    margin: 0 0 8px 0;
    color: var(--text);
}

.profile-card p {
    margin: 0;
    color: var(--muted);
}

.account-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.account-actions .btn {
    width: 100%;
    justify-content: center;
}

/* Books View Styles */
.books-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 4px;
}

.books-title h1 {
    margin: 0 0 4px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

.books-count {
    color: var(--muted);
    font-size: 14px;
}

.books-actions {
    display: flex;
    gap: 8px;
}

.books-actions .btn {
    padding: 8px 12px;
    font-size: 16px;
}

.books-actions .btn.active {
    background: var(--accent);
    color: #051225;
}

/* Filter Styles */
.filter-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 0;
}

.filter-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.filter-option span {
    font-size: 14px;
    color: var(--text);
}

.filter-select {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text);
    font-size: 14px;
    outline: none;
}

.filter-select:focus {
    border-color: var(--accent);
}

/* Stats Summary */
.stats-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #121a34;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.stat-item .stat-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

.stat-item .stat-label {
    font-size: 12px;
    color: var(--muted);
}

/* Book Cards Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
    flex: 1;
}

.book-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
    height: 270px !important;
}

.book-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.book-card-content {
    padding: 14px;
    height: 220px;
}

.book-title {
    margin: 0 0 10px 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.book-info {
    margin-bottom: 12px;
}

.book-meta {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.book-materia,
.book-nivel,
.book-grado {
    font-size: 10px;
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    background: #121a34;
}

.book-assigned {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
}

.book-progress-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.book-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.book-progress .progress-bar {
    flex: 1;
    height: 6px;
    background: #1a2444;
    border-radius: 3px;
    overflow: hidden;
}

.book-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.book-progress .progress-text {
    font-size: 11px;
    color: var(--muted);
    min-width: 30px;
}

.book-chapters {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}

.book-card-actions {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    background: #0f1424;
    border-top: 1px solid var(--border);
}

.book-card-actions .btn {
    flex: 1;
    padding: 6px 10px;
    font-size: 11px;
}

/* Book List View */
.books-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.book-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.book-row:hover {
    border-color: var(--accent);
    background: #152042;
}

.book-row-info {
    flex: 1;
    min-width: 0;
}

.book-row-title h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.book-row-title .book-author {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

.book-row-meta {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.book-row-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.book-row-progress .progress-bar {
    flex: 1;
    height: 6px;
    background: #1a2444;
    border-radius: 3px;
    overflow: hidden;
}

.book-row-progress .progress-text {
    font-size: 12px;
    color: var(--muted);
    min-width: 35px;
}

.book-row-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.book-row-actions .btn {
    padding: 6px 10px;
    font-size: 12px;
}

/* Modal Styles */
.modal-content {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: #0f1424;
}

.modal-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: 60vh;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: #0f1424;
}

/* Form Styles */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 8px 0;
    color: var(--text);
    font-size: 20px;
}

.empty-state p {
    margin: 0 0 24px 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

/* Utility */
.hidden {
    display: none !important
}

.nowrap {
    white-space: nowrap
}

.small {
    font-size: 12px;
    color: var(--muted)
}

.spacer {
    flex: 1
}

/* Add Book Card */
.add-book-card {
    border: 2px dashed var(--border);
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-book-card:hover {
    border-color: var(--accent);
    background: rgba(64, 123, 255, 0.05);
    transform: translateY(-2px);
}

.add-book-card .book-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.add-book-icon {
    font-size: 32px;
    color: var(--accent);
    margin-bottom: 12px;
    font-weight: bold;
}

.add-book-card .book-title {
    margin: 0 0 8px 0;
    color: var(--text);
    font-size: 16px;
}

.add-book-card .book-description {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.add-book-card .book-card-actions {
    width: 100%;
    justify-content: center;
}

.add-book-card .book-card-actions .btn {
    background: var(--accent);
    color: white;
    border: none;
    font-weight: 600;
}

.add-book-card .book-card-actions .btn:hover {
    background: var(--accent-2);
}

/* Book Stats */
.book-stats {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--muted);
}

.book-videos {
    white-space: nowrap;
}

.book-validity {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}

/* QR Reader Styles */
.qr-reader-container {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    background: #0f1424;
    margin-bottom: 10px;
}

.qr-reader-container #qrReader {
    width: 100%;
    min-height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Simple message styles */
.simple-message {
    background: rgba(64, 123, 255, 0.1);
    border: 1px solid rgba(64, 123, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.simple-message h6 {
    color: #ffffff;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* Form improvements for better contrast */
.form-label {
    color: #ffffff !important;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-control {
    background: #1a2444 !important;
    border: 1px solid #2a3a5a !important;
    color: #ffffff !important;
    padding: 12px 15px;
    font-size: 14px;
}

.form-control::placeholder {
    color: #8a9bb8 !important;
    opacity: 1;
}

.form-control:focus {
    background: #1a2444 !important;
    border-color: #407bff !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.2rem rgba(64, 123, 255, 0.25);
}

/* Remove old QR controls styles */
.qr-controls {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
}

.qr-controls .btn {
    font-size: 12px;
    padding: 6px 12px;
}

/* Modal improvements */
.modal-lg {
    max-width: 600px;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* Alert styles */
.alert {
    margin-bottom: 15px;
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 14px;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #28a745;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
}