* { box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    margin: 0;
    background: #0b1120;
    color: #e2e8f0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.top-band {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: #020617;
    border-bottom: 1px solid #1f2937;
    position: sticky;
    top: 0;
    z-index: 20;
}
.top-band-inner {
    width: 100%;
    max-width: 1100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.top-band-left { display: flex; align-items: center; gap: 12px; }
.logo { height: 40px; }
.top-title { font-size: 1.25rem; font-weight: 700; color: #e5e7eb; }
.btn-iniciar {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 8px;
    border: 1px solid #3b82f6;
    background: #2563eb;
    color: #fff;
    font-size: 0.95rem;
    text-decoration: none;
    font-weight: 500;
}
.btn-iniciar:hover { background: #1d4ed8; }
.top-band-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.usuario-nombre { font-size: 0.9rem; color: #9ca3af; margin-right: 4px; }
.btn-inicio {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #4b5563;
    background: transparent;
    color: #93c5fd;
    font-size: 0.95rem;
    text-decoration: none;
}
.btn-inicio:hover { background: #1f2937; color: #e5e7eb; }
.btn-cerrar {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 8px;
    border: 1px solid #4b5563;
    background: transparent;
    color: #93c5fd;
    font-size: 0.95rem;
    text-decoration: none;
}
.btn-cerrar:hover { background: #1f2937; color: #e5e7eb; }
.btn-gestion-usuarios {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #6b7280;
    background: #374151;
    color: #e5e7eb;
    font-size: 0.9rem;
    cursor: pointer;
}
.btn-gestion-usuarios:hover { background: #4b5563; color: #fff; }
/* Enlace con mismo aspecto que el botón Gestión (en formularios redirige a index) */
.btn-gestion-usuarios-link {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #6b7280;
    background: #374151;
    color: #e5e7eb;
    font-size: 0.9rem;
    text-decoration: none;
}
.btn-gestion-usuarios-link:hover { background: #4b5563; color: #fff; }
/* Menú superior fijo: mismo menú en todas las páginas para usuarios logueados */
.menu-superior-fijo { position: fixed; top: 0; left: 0; right: 0; z-index: 100; }
.menu-superior-espacio { height: 56px; flex-shrink: 0; }
.btn-panel {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #059669;
    background: #047857;
    color: #fff;
    font-size: 0.9rem;
    text-decoration: none;
}
.btn-panel:hover { background: #065f46; color: #fff; }
.btn-cambiar-mi-pass {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #4b5563;
    background: transparent;
    color: #93c5fd;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
}
.btn-cambiar-mi-pass:hover { background: #1f2937; color: #e5e7eb; }

.page {
    flex: 1;
    padding: 24px 16px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
.card-form {
    width: 100%;
    max-width: 640px;
    background: #111827;
    border-radius: 18px;
    padding: 28px 32px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.35);
}
.form-titulo {
    color: #f9fafb;
    margin: 0 0 6px 0;
    font-size: 1.35rem;
    font-weight: 600;
}
.form-subtitle {
    color: #9ca3af;
    font-size: 0.95rem;
    margin: 0 0 24px 0;
}
.form-tramite { display: flex; flex-direction: column; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
    color: #d1d5db;
    font-size: 0.9rem;
    font-weight: 500;
}
.form-group input,
.form-group textarea {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #4b5563;
    background: #1f2937;
    color: #e5e7eb;
    font-size: 0.95rem;
    font-family: inherit;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #6b7280; }
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}
.btn-enviar {
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    background: #2563eb;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
}
.btn-enviar:hover { background: #1d4ed8; }
.btn-volver {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 8px;
    border: 1px solid #4b5563;
    background: transparent;
    color: #93c5fd;
    font-size: 0.95rem;
    text-decoration: none;
}
.btn-volver:hover { background: #1f2937; }

/* Responsivo: móviles */
@media (max-width: 768px) {
    .top-band { padding: 10px 12px; }
    .top-band-inner { flex-wrap: wrap; justify-content: center; gap: 8px; }
    .top-band-left { flex-wrap: wrap; justify-content: center; text-align: center; }
    .top-title { font-size: 1rem; line-height: 1.3; }
    .logo { height: 36px; }
    .btn-iniciar, .btn-inicio, .btn-cerrar, .btn-gestion-usuarios, .btn-gestion-usuarios-link, .btn-panel, .btn-cambiar-mi-pass {
        min-height: 44px;
        padding: 10px 16px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .page { padding: 16px 12px; }
    .card-form {
        padding: 24px 20px;
        border-radius: 12px;
    }
    .form-titulo { font-size: 1.2rem; }
    .form-group input,
    .form-group textarea {
        min-height: 48px;
        font-size: 16px;
        padding: 12px 14px;
    }
    .form-group textarea { min-height: 100px; }
    .btn-enviar, .btn-volver {
        min-height: 48px;
        padding: 12px 20px;
        font-size: 1rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .form-actions { flex-direction: column; }
    .form-actions .btn-volver { width: 100%; text-align: center; }
}
@media (max-width: 480px) {
    .top-title { font-size: 0.9rem; }
    .card-form { padding: 20px 16px; }
}
