* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #0f172a;
    color: #e5e7eb;
    overflow-x: hidden;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    padding: 8px 24px;
    background: linear-gradient(to right, #1d4ed8, #7c3aed);
    color: white;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.7);
    position: sticky;
    top: 0;
    z-index: 10;
}

header h1 {
    margin: 0;
    font-size: 20px;
    letter-spacing: 0.03em;
}

header p {
    margin: 4px 0 0;
    font-size: 13px;
    opacity: 0.9;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    align-items: center;
}

.nav-logo {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.03em;
    margin-right: 16px;
    padding: 6px 0;
}

.nav-logo-center {
    display: block;
    text-align: center;
    margin: 0 auto;
}

.login-header {
    padding: 24px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

main {
    flex: 1;
    padding: 24px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.card {
    background: rgba(15, 23, 42, 0.95);
    border-radius: 16px;
    padding: 20px 22px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.card-header h2 {
    margin: 0;
    font-size: 17px;
}

.card-header-actions {
    display: flex;
    gap: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 14px;
}

th, td {
    padding: 10px 8px;
    text-align: left;
}

th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    border-bottom: 1px solid rgba(148, 163, 184, 0.4);
}

tbody tr {
    border-bottom: 1px solid rgba(30, 64, 175, 0.35);
}

tbody tr:hover {
    background: rgba(30, 64, 175, 0.32);
}

td.actions {
    text-align: right;
    white-space: nowrap;
}

.badge-muted {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.4);
    color: #e5e7eb;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    background: rgba(30, 64, 175, 0.96);
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover {
    background: rgba(59, 130, 246, 1);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.5);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    border-color: rgba(148, 163, 184, 0.7);
    color: #e5e7eb;
}

.btn-secondary:hover {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(209, 213, 219, 1);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.8);
}

.btn-danger {
    background: rgba(185, 28, 28, 0.95);
}

.btn-danger:hover {
    background: rgba(220, 38, 38, 1);
    box-shadow: 0 10px 25px rgba(153, 27, 27, 0.7);
}

/* Barra de busca */
.search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}
.search-input {
    flex: 1;
    min-width: 180px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    font-size: 14px;
}
.search-input:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 1);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.9);
}
.search-input::placeholder {
    color: #9ca3af;
}

/* Paginação */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.pagination-info {
    font-size: 13px;
    color: #9ca3af;
}

/* Escolher playlist para adicionar música */
.card-title-inline {
    margin: 0 0 14px;
    font-size: 16px;
}
.playlist-pick-list {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
}
.playlist-pick-list li {
    margin-bottom: 8px;
}
.playlist-pick-list li .btn {
    min-height: 44px;
}
.success-msg {
    color: #34d399;
    margin-bottom: 10px;
}
.error-msg {
    color: #f87171;
    margin-bottom: 10px;
}
.login-card {
    max-width: 360px;
    margin: 0 auto;
}
.login-card h2 {
    margin: 0 0 14px;
    font-size: 18px;
}
.badge-shared {
    display: inline-block;
    font-size: 11px;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.2);
    padding: 2px 8px;
    border-radius: 6px;
}
.playlist-row-shared {
    background: rgba(30, 64, 175, 0.15);
}
.playlist-row-shared:hover {
    background: rgba(30, 64, 175, 0.28);
}
.card-shared {
    border-left: 4px solid rgba(59, 130, 246, 0.7);
}
.shared-badge {
    margin: 0 0 10px;
    padding: 8px 10px;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 8px;
    color: #93c5fd;
}
.badge-lider {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.2);
    padding: 2px 8px;
    border-radius: 6px;
}
.badge-membro {
    display: inline-block;
    font-size: 11px;
    color: #9ca3af;
    background: rgba(148, 163, 184, 0.2);
    padding: 2px 8px;
    border-radius: 6px;
}
.nav-link-logout {
    margin-left: auto;
}

/* Ordem na playlist: subir/descer */
.order-actions {
    white-space: nowrap;
}
.btn-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(30, 64, 175, 0.3);
    color: #e5e7eb;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.btn-order:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.5);
}
.btn-order:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.empty-state {
    padding: 14px 4px 4px;
    font-size: 14px;
    color: #9ca3af;
}
.empty-state a {
    color: #93c5fd;
    text-decoration: none;
}
.empty-state a:hover {
    text-decoration: underline;
}

.meta {
    font-size: 11px;
    color: #9ca3af;
}

.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 280px) minmax(0, 1.3fr);
    gap: 16px;
}

.field {
    margin-bottom: 10px;
}

.field label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    color: #d1d5db;
}

.field input[type="text"] {
    width: 100%;
    padding: 7px 9px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    font-size: 14px;
}

.field input[type="text"]:focus,
.field select:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 1);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.9);
}

.field select {
    width: 100%;
    max-width: 160px;
    padding: 7px 9px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    font-size: 14px;
}

.song-editor {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.85);
    background: radial-gradient(circle at top left, rgba(30, 64, 175, 0.22), transparent 55%),
                radial-gradient(circle at bottom right, rgba(88, 28, 135, 0.24), transparent 55%),
                rgba(15, 23, 42, 0.98);
    padding: 10px;
}

.song-editor textarea {
    width: 100%;
    min-height: 360px;
    resize: vertical;
    border: none;
    outline: none;
    background: transparent;
    color: #e5e7eb;
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre;
}

.helper-text {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

.helper-text code {
    padding: 1px 6px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.8);
}

.song-view {
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.85);
    background: radial-gradient(circle at top left, rgba(30, 64, 175, 0.22), transparent 55%),
                radial-gradient(circle at bottom right, rgba(88, 28, 135, 0.24), transparent 55%),
                rgba(15, 23, 42, 0.98);
    padding: 14px;
    overflow-x: auto;
}

.song-view pre {
    margin: 0;
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 12px;
}

.breadcrumbs a {
    color: #e5e7eb;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    gap: 10px;
}

.actions-row-right {
    display: flex;
    gap: 8px;
}

footer {
    padding: 10px 24px 14px;
    font-size: 11px;
    color: #6b7280;
    text-align: center;
    border-top: 1px solid rgba(31, 41, 55, 0.9);
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 1));
}

/* Modo culto: todas as cifras da playlist em uma página */
.playlist-all-cifras .all-cifras-header {
    padding-bottom: 16px;
}
.all-cifras-header-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}
.all-cifras-header-row h1 {
    margin: 0;
    flex: 1;
}
.cifras-index {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.cifras-index .btn-index {
    font-size: 12px;
    padding: 5px 9px;
}
.btn-culto {
    background: rgba(34, 197, 94, 0.9);
}
.btn-culto:hover {
    background: rgba(34, 197, 94, 1);
}
.all-cifras-main {
    max-width: 900px;
    margin: 0 auto;
}
.all-cifras-block {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}
.all-cifras-block:last-child {
    border-bottom: none;
}
.all-cifras-title {
    font-size: 18px;
    margin: 0 0 8px;
    color: #e5e7eb;
}
.all-cifras-meta {
    margin-bottom: 10px;
    font-size: 13px;
    color: #9ca3af;
}
.all-cifras-meta .all-cifras-tom strong {
    color: #e5e7eb;
}
.all-cifras-controls {
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.all-cifras-controls .transpose-btn,
.all-cifras-controls .capo-casa {
    cursor: pointer;
}
.all-cifras-back {
    margin: 12px 0 0;
}

/* Controles transposição +/- e capotraste */
.transpose-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.transpose-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}
.transpose-wrap .transpose-value {
    min-width: 48px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}
.transpose-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    font-size: 18px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}
.transpose-btn:hover {
    background: rgba(30, 64, 175, 0.5);
    color: #fff;
}
.capo-toggle-wrap {
    position: relative;
}
.capo-toggle {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    font-size: 13px;
    cursor: pointer;
}
.capo-toggle:hover {
    background: rgba(30, 64, 175, 0.35);
}
.capo-strip {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.4);
}
.capo-strip.visible {
    display: flex;
}
.capo-casa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(30, 64, 175, 0.3);
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}
.capo-casa:hover {
    background: rgba(59, 130, 246, 0.5);
}
.capo-casa.active {
    background: rgba(59, 130, 246, 0.8);
    border-color: rgba(59, 130, 246, 1);
}

.playlist-song-pick {
    list-style: none;
    padding: 0;
    margin: 12px 0;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    padding: 8px;
}

.playlist-song-pick li {
    padding: 6px 8px;
    border-radius: 6px;
}

.playlist-song-pick li:hover {
    background: rgba(30, 64, 175, 0.25);
}

.playlist-song-pick label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.playlist-song-pick input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* Tabelas: scroll horizontal em telas pequenas */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -2px;
}
.table-responsive table {
    min-width: 560px;
}

/* ========== RESPONSIVO: tablet ========== */
@media (max-width: 900px) {
    main {
        padding: 16px;
    }

    .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .card {
        padding: 16px 18px;
    }

    .card-header {
        flex-wrap: wrap;
    }

    .card-header-actions {
        flex-wrap: wrap;
    }

    .actions-row {
        flex-wrap: wrap;
    }

    .actions-row-right {
        flex-wrap: wrap;
    }

    .transpose-controls {
        gap: 10px;
    }

    .song-view pre {
        font-size: 13px;
    }
    .nav-link {
        font-size: 10px;
    }
    .nav-logo {
        font-size: 11px;
    }
}

/* ========== RESPONSIVO: celular ========== */
@media (max-width: 768px) {
    header {
        padding: 12px 16px;
    }

    header h1 {
        font-size: 18px;
    }

    header p {
        font-size: 12px;
    }

    .main-nav {
        margin-top: 10px;
        padding-top: 10px;
        gap: 6px 8px;
    }

    main {
        padding: 12px 14px;
        max-width: 100%;
    }

    .card {
        padding: 14px 16px;
        border-radius: 12px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 12px;
    }

    .card-header h2 {
        font-size: 16px;
        line-height: 1.35;
        word-break: break-word;
    }

    .card-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .table-responsive {
        margin-left: -14px;
        margin-right: -14px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .table-responsive table {
        min-width: 480px;
        font-size: 13px;
    }

    th, td {
        padding: 8px 6px;
    }

    td.actions {
        text-align: left;
    }

    td.actions .btn,
    td.actions form {
        display: inline-block;
        margin-bottom: 4px;
    }

    .breadcrumbs {
        flex-wrap: wrap;
        gap: 4px 6px;
        font-size: 11px;
        margin-bottom: 10px;
    }

    .actions-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-top: 10px;
    }

    .actions-row-right {
        flex-direction: column;
    }

    .actions-row-right .btn,
    .actions-row-right form .btn {
        width: 100%;
        justify-content: center;
    }

    .transpose-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 10px;
    }

    .transpose-wrap {
        flex-wrap: wrap;
    }

    .capo-strip {
        padding: 8px;
        gap: 6px;
    }

    .capo-casa {
        min-width: 44px;
        min-height: 44px;
        width: 44px;
        height: 44px;
    }

    .transpose-btn {
        min-width: 44px;
        min-height: 44px;
        width: 44px;
        height: 44px;
    }

    .song-view {
        padding: 10px 12px;
        margin-left: -2px;
        margin-right: -2px;
        border-radius: 10px;
    }

    .song-view pre {
        font-size: 12px;
        line-height: 1.5;
    }

    .song-editor {
        padding: 8px;
    }

    .song-editor textarea {
        min-height: 280px;
        font-size: 13px;
    }

    .helper-text {
        font-size: 11px;
    }

    footer {
        padding: 8px 14px 12px;
        font-size: 10px;
    }

    /* Modo culto em celular */
    .playlist-all-cifras .all-cifras-header {
        padding: 12px 16px 14px;
    }

    .playlist-all-cifras .all-cifras-header h1 {
        font-size: 18px;
    }

    .all-cifras-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .cifras-index {
        max-height: 120px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cifras-index .btn-index {
        min-height: 44px;
        padding: 10px 12px;
        font-size: 12px;
    }

    .all-cifras-main {
        padding: 0 14px;
    }

    .all-cifras-block {
        margin-bottom: 24px;
        padding-bottom: 20px;
    }

    .all-cifras-title {
        font-size: 16px;
    }

    .all-cifras-meta {
        font-size: 12px;
    }

    .all-cifras-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .all-cifras-controls .transpose-wrap form {
        display: inline-block;
    }

    .all-cifras-controls .capo-strip .capo-casa {
        min-width: 44px;
        min-height: 44px;
    }
}

/* ========== RESPONSIVO: celular pequeno ========== */
@media (max-width: 480px) {
    header {
        padding: 10px 12px;
    }

    header h1 {
        font-size: 16px;
    }

    main {
        padding: 10px 12px;
    }

    .card {
        padding: 12px 14px;
    }

    .table-responsive table {
        min-width: 400px;
    }

    .song-view pre {
        font-size: 11px;
    }

    .btn {
        padding: 10px 12px;
        font-size: 12px;
    }
}

/* ========== PÁGINA DE PERFIL ========== */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.profile-info {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 16px 0;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(to right, #1d4ed8, #7c3aed);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-details {
    flex: 1;
}

.profile-field {
    margin-bottom: 12px;
}

.profile-field:last-child {
    margin-bottom: 0;
}

.profile-label {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.profile-value {
    display: block;
    font-size: 15px;
    color: #e5e7eb;
}

/* ========== NOVO DESIGN DE LOGIN ========== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    background: #0a0a0f;
    line-height: 1.5;
    position: relative;
    overflow-x: hidden;
}

/* Neural Background */
.neural-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.neural-node {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #3b82f6;
    border-radius: 50%;
    opacity: 0.6;
    animation: neuralPulse 4s ease-in-out infinite;
}

.neural-node:nth-child(1) { top: 20%; left: 15%; animation-delay: 0s; }
.neural-node:nth-child(2) { top: 60%; left: 80%; animation-delay: 1s; }
.neural-node:nth-child(3) { top: 80%; left: 20%; animation-delay: 2s; }
.neural-node:nth-child(4) { top: 30%; left: 70%; animation-delay: 3s; }
.neural-node:nth-child(5) { top: 10%; left: 60%; animation-delay: 4s; }

@keyframes neuralPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.5); }
}

.login-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0 auto;
}

.login-card {
    background: rgba(15, 15, 20, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    padding: 40px 32px;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.ai-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    animation: aiGlow 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes aiGlow {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
    position: relative;
    z-index: 1;
}

.ai-logo {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-core {
    position: relative;
    z-index: 3;
    color: #3b82f6;
    animation: coreRotate 8s linear infinite;
}

@keyframes coreRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.logo-rings {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ring {
    position: absolute;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    animation: ringPulse 3s ease-in-out infinite;
}

.ring-1 { width: 60px; height: 60px; top: 10px; left: 10px; animation-delay: 0s; }
.ring-2 { width: 70px; height: 70px; top: 5px; left: 5px; animation-delay: 1s; }
.ring-3 { width: 80px; height: 80px; top: 0; left: 0; animation-delay: 2s; }

@keyframes ringPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

.login-header h1 {
    color: #f8fafc;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.login-header p {
    color: #94a3b8;
    font-size: 14px;
    font-weight: 400;
}

/* Error Alert */
.error-alert {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 24px;
    color: #fca5a5;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

/* Smart Fields */
.smart-field {
    position: relative;
    margin-bottom: 28px;
}

.field-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.smart-field input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 16px 50px 16px 16px;
    color: #f8fafc;
    font-size: 15px;
    font-weight: 400;
    outline: none;
    position: relative;
    z-index: 2;
    font-family: inherit;
}

.smart-field input::placeholder {
    color: transparent;
}

.smart-field label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 15px;
    font-weight: 400;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 3;
    background: rgba(15, 15, 20, 0.8);
    padding: 0 4px;
}

.smart-field input:focus + label,
.smart-field input:not(:placeholder-shown) + label {
    top: 0;
    font-size: 12px;
    font-weight: 500;
    color: #3b82f6;
    transform: translateY(-50%);
}

.smart-field input:focus ~ .field-background {
    border-color: #3b82f6;
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.5);
}

.ai-indicator {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    z-index: 4;
}

.ai-pulse {
    width: 100%;
    height: 100%;
    background: #3b82f6;
    border-radius: 50%;
    opacity: 0;
    animation: aiIndicator 2s ease-in-out infinite;
}

.smart-field input:focus ~ .ai-indicator .ai-pulse {
    opacity: 1;
}

@keyframes aiIndicator {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.5); opacity: 1; }
}

.field-completion {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 0 0 12px 12px;
}

.smart-field input:valid ~ .field-completion {
    width: 100%;
}

/* Password Toggle */
.smart-field:has(.smart-toggle) input {
    padding-right: 90px;
}

.smart-toggle {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.smart-toggle:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.toggle-hide {
    display: none;
}

.smart-toggle.toggle-active .toggle-show {
    display: none;
}

.smart-toggle.toggle-active .toggle-hide {
    display: block;
}

/* Neural Button */
.neural-button {
    width: 100%;
    background: transparent;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    position: relative;
    margin-bottom: 28px;
    overflow: hidden;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.button-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.neural-button:hover .button-bg {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    transform: scale(1.02);
}

.neural-button:active .button-bg {
    transform: scale(0.98);
}

.button-text {
    position: relative;
    z-index: 2;
    transition: opacity 0.2s ease;
}

.button-loader {
    position: absolute;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.neural-spinner {
    display: flex;
    gap: 4px;
}

.spinner-segment {
    width: 4px;
    height: 16px;
    background: #ffffff;
    border-radius: 2px;
    animation: neuralSpinner 1.2s ease-in-out infinite;
}

.spinner-segment:nth-child(2) { animation-delay: 0.1s; }
.spinner-segment:nth-child(3) { animation-delay: 0.2s; }

@keyframes neuralSpinner {
    0%, 80%, 100% { transform: scaleY(0.5); opacity: 0.5; }
    40% { transform: scaleY(1); opacity: 1; }
}

.neural-button.loading .button-text {
    opacity: 0;
}

.neural-button.loading .button-loader {
    opacity: 1;
}

.button-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 14px;
    opacity: 0;
    filter: blur(8px);
    transition: opacity 0.3s ease;
    z-index: -1;
}

.neural-button:hover .button-glow {
    opacity: 0.6;
}

/* Error Messages */
.error-message {
    color: #ef4444;
    font-size: 12px;
    font-weight: 500;
    margin-top: 6px;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.2s ease;
    position: relative;
    z-index: 5;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

.smart-field.error .field-background {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.smart-field.error label {
    color: #ef4444;
}

.smart-field.error .field-completion {
    background: #ef4444;
}

/* Success Neural */
.success-neural {
    display: none;
    text-align: center;
    padding: 40px 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.success-neural.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.success-core {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-rings {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.success-ring {
    position: absolute;
    border: 2px solid #10b981;
    border-radius: 50%;
    animation: successRing 1s ease-out forwards;
}

.success-ring:nth-child(1) { width: 60px; height: 60px; top: 10px; left: 10px; animation-delay: 0s; }
.success-ring:nth-child(2) { width: 70px; height: 70px; top: 5px; left: 5px; animation-delay: 0.2s; }
.success-ring:nth-child(3) { width: 80px; height: 80px; top: 0; left: 0; animation-delay: 0.4s; }

@keyframes successRing {
    0% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0.7; transform: scale(1); }
}

.success-core svg {
    color: #10b981;
    position: relative;
    z-index: 2;
    animation: successCheck 0.6s ease-out 0.6s forwards;
    opacity: 0;
}

@keyframes successCheck {
    0% { opacity: 0; transform: scale(0); }
    100% { opacity: 1; transform: scale(1); }
}

.success-neural h3 {
    color: #f8fafc;
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.success-neural p {
    color: #94a3b8;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .login-container {
        padding: 16px;
    }
    
    .login-card {
        padding: 32px 24px;
        border-radius: 16px;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .ai-logo {
        width: 60px;
        height: 60px;
    }
    
    .ring-1 { width: 45px; height: 45px; top: 7.5px; left: 7.5px; }
    .ring-2 { width: 52px; height: 52px; top: 4px; left: 4px; }
    .ring-3 { width: 60px; height: 60px; top: 0; left: 0; }
}
