/* ================================
   PROPINI - Calculadora de Propinas
   Tema Nocturno Amigable
   ================================ */

:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --accent: #7c3aed;
    --accent-light: #a78bfa;
    --accent-glow: rgba(124, 58, 237, 0.3);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --success: #10b981;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --radius: 16px;
    --radius-sm: 10px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at top, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-container {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.main-logo {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--border);
    padding: 2px;
    filter: drop-shadow(0 0 20px var(--accent-glow));
    background: var(--bg-secondary);
}

.subtitle {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.percentage {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-light);
    background: var(--accent-glow);
    padding: 4px 10px;
    border-radius: 20px;
}

.hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Inputs */
label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

input[type="number"] {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 1.1rem;
    font-family: inherit;
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

input[type="number"]::placeholder {
    color: var(--text-muted);
}

/* Total Section */
.total-section .input-group {
    position: relative;
}

.total-section .currency {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-light);
}

.total-section input {
    padding-left: 36px;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Garzones Grid */
.garzones-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.garzon-item {
    text-align: center;
}

.garzon-item label {
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.garzon-item input {
    text-align: center;
    padding: 12px 8px;
}

/* Staff Section */
.staff-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.staff-group {
    text-align: center;
}

.staff-group h2 {
    justify-content: center;
}

/* Button */
.btn-calcular {
    width: 100%;
    background: linear-gradient(135deg, var(--accent), #6d28d9);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 18px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 16px;
}

.btn-calcular:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

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

.btn-secondary {
    width: 100%;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 16px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

/* Results */
.resultados {
    background: linear-gradient(135deg, var(--bg-card), #1e1e3f);
    border-color: var(--accent);
}

.resultados.hidden {
    display: none;
}

.resultados h2 {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.resultado-section {
    margin-bottom: 24px;
}

.resultado-section:last-child {
    margin-bottom: 0;
}

.resultado-section h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.valor-hora {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.valor-hora span {
    color: var(--accent-light);
    font-weight: 600;
}

.resultado-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.resultado-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
}

.resultado-item .label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.resultado-item .valor {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--success);
}

/* Footer */
footer {
    text-align: center;
    padding: 24px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resultados:not(.hidden) {
    animation: fadeIn 0.3s ease;
}

/* Responsive */
@media (max-width: 400px) {
    .garzones-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    header h1 {
        font-size: 2rem;
    }
}