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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f0e8;
    color: #2c2c2c;
    min-height: 100vh;
}

/* LOGIN */
#login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f5f0e8;
}

.login-box {
    background: white;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    width: 320px;
}

.logo { width: 80px; margin-bottom: 16px; }
.logo-small { width: 36px; }

.login-box h2 {
    font-size: 1.2rem;
    margin-bottom: 4px;
    color: #2c2c2c;
}

.login-box p { color: #888; font-size: 0.9rem; margin-bottom: 16px; }

.pin-display {
    font-size: 2rem;
    letter-spacing: 12px;
    margin: 16px 0;
    color: #c8a96e;
    font-weight: bold;
}

.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.pin-pad button {
    background: #f5f0e8;
    border: none;
    border-radius: 10px;
    padding: 18px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.15s;
}

.pin-pad button:hover { background: #e8e0d0; }

.error { color: #e74c3c; font-size: 0.85rem; margin-top: 8px; }

/* HEADER */
header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

header span {
    flex: 1;
    font-weight: 600;
    color: #2c2c2c;
}

header button {
    background: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 6px 14px;
    cursor: pointer;
    color: #888;
    font-size: 0.85rem;
}

/* TABS */
.tabs {
    display: flex;
    background: white;
    border-bottom: 2px solid #f0ebe0;
    padding: 0 20px;
}

.tab {
    background: none;
    border: none;
    padding: 14px 20px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #888;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab.active {
    color: #c8a96e;
    border-bottom-color: #c8a96e;
    font-weight: 600;
}

/* CONTENIDO */
.tab-content {
    padding: 24px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.tab-content h2 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #2c2c2c;
}

/* TABLA */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

th {
    background: #f5f0e8;
    padding: 12px 16px;
    text-align: left;
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid #f5f0e8;
    font-size: 0.9rem;
}

tr:last-child td { border-bottom: none; }
tr.stock-bajo td { background: #fff5f5; }

.entrada { color: #27ae60; font-weight: 600; text-transform: capitalize; }
.salida { color: #e74c3c; font-weight: 600; text-transform: capitalize; }

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 6px;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0d8cc;
    border-radius: 10px;
    font-size: 0.95rem;
    background: white;
    color: #2c2c2c;
    max-width: 400px;
}

.btn-primary {
    background: #c8a96e;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 28px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s;
}

.btn-primary:hover { background: #b8955a; }

.msg {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #27ae60;
}

/* ALERTA */
.alerta {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: #856404;
}