* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 24px;
    color: #1a1a2e;
    font-weight: 700;
}

.logo p {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #333;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #0f3460;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(15, 52, 96, 0.1);
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #0f3460, #1a1a2e);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 52, 96, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 184, 148, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Login Screen */
#login-screen {
    display: block;
}

#main-screen {
    display: none;
}

.lock-icon {
    text-align: center;
    font-size: 50px;
    margin-bottom: 10px;
}

.error-msg {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 10px;
    text-align: center;
    display: none;
}

.success-msg {
    color: #00b894;
    font-size: 14px;
    margin-top: 15px;
    text-align: center;
    display: none;
    font-weight: 600;
}

.select-wrapper {
    position: relative;
}

.select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
}

.select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
    font-size: 12px;
}

.add-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.add-row .select-wrapper {
    flex: 1;
}

.btn-add {
    padding: 14px 18px;
    border: none;
    border-radius: 12px;
    background: #0f3460;
    color: white;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add:hover {
    background: #1a1a2e;
    transform: translateY(-1px);
}

.selected-list {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selected-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0f4f8;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.selected-item .remove-btn {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s;
}

.selected-item .remove-btn:hover {
    background: #c0392b;
}

.empty-msg {
    color: #aaa;
    font-size: 13px;
    text-align: center;
    padding: 10px;
}

.response-box {
    margin-top: 15px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    display: none;
}

.response-box.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.response-box.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.logout-btn {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 13px;
    margin-top: 20px;
    display: block;
    text-align: center;
    width: 100%;
    font-weight: 600;
}

.logout-btn:hover {
    text-decoration: underline;
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.4s ease;
}

/* Menú principal */
.menu-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 14px;
    background: #f8f9fa;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.menu-item:hover {
    border-color: #0f3460;
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 52, 96, 0.15);
}

.menu-item .icon {
    font-size: 32px;
    line-height: 1;
}

.menu-item .titulo {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
}

.menu-item .desc {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}

/* Volver al menú */
.back-link {
    display: inline-block;
    margin-bottom: 18px;
    color: #0f3460;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}
