:root {
    --bg-body: #f1f5f4;
    --green-soft: #8bbf9f;
    --green-deep: #3f7d5c;
    --coffee-soft: #c9a889;
    --coffee-deep: #8b5e3c;
    --gray-soft: #e2e6ea;
    --gray-deep: #4b5563;
    --white: #ffffff;
    --border-soft: rgba(148, 163, 184, 0.35);
    --radius-lg: 16px;
    --radius-md: 10px;
    --shadow-soft: 0 14px 30px rgba(15, 23, 42, 0.2);
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background: radial-gradient(circle at top, #f4f7f6, #e3e7e6);
    color: #111827;
}

/* Layout */
.layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    background: linear-gradient(180deg, #2f3f37, #1f2a24);
    color: #f9fafb;
    padding: 1.6rem 1.2rem;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(209, 213, 219, 0.2);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.nav-link {
    display: block;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.18s ease, transform 0.18s ease;
}

.nav-link:hover {
    background: rgba(148, 163, 184, 0.25);
    transform: translateX(2px);
}

.nav-link-active {
    background: linear-gradient(90deg, #8bbf9f, #c9a889);
    color: #0f172a;
}

.nav-link-danger {
    margin-top: auto;
    background: transparent;
    border: 1px solid rgba(248, 113, 113, 0.4);
}

/* Main content */
.main {
    padding: 1.8rem 2rem;
}

.main-header h1 {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}

.main-header p {
    font-size: 0.95rem;
    color: #6b7280;
}

/* Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.card {
    background: radial-gradient(circle at top left, #ffffff, #f0f4f2);
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.4rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-soft);
}

.metric-card h2 {
    font-size: 0.95rem;
    color: #4b5563;
    margin-bottom: 0.6rem;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
}

.metric-label {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Tabla */
.table-card h2 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.table th,
.table td {
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    text-align: left;
    color: #4b5563;
    font-weight: 600;
    background: #f3f4f6;
}

/* Formularios */
.form {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.form-label {
    font-size: 0.86rem;
    color: #4b5563;
}

.form-input {
    border-radius: var(--radius-md);
    border: 1px solid #d1d5db;
    padding: 0.5rem 0.6rem;
    font-size: 0.92rem;
    outline: none;
    background: #f9fafb;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-input:focus {
    border-color: #6cb592;
    box-shadow: 0 0 0 1px rgba(108, 181, 146, 0.35);
}

/* Botones */
.btn-primary {
    margin-top: 0.6rem;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: linear-gradient(120deg, #6cb592, #c9a889);
    color: #0b1120;
    font-weight: 600;
    font-size: 0.92rem;
    box-shadow: 0 10px 22px rgba(148, 163, 184, 0.5);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(148, 163, 184, 0.65);
}

/* Alertas */
.alert {
    border-radius: var(--radius-md);
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Login */
.bg-auth {
	min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: 
        linear-gradient(rgba(15,23,42,0.6), rgba(15,23,42,0.7)),
        url('bg3.jpg') no-repeat center center fixed;
    background-size: cover;
}

.auth-card {
    width: min(420px, 94vw);
    background: radial-gradient(circle at top left, #ffffff, #f2f6f4);
    border-radius: 18px;
    padding: 1.8rem 1.6rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-soft);
}

.auth-title {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
	text-align: center;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1rem;
	text-align: center;
}
.auth-logo {
    display: block;
    margin: 0 auto 0.8rem auto; /* centrado, con margen abajo */
    max-width: 150px;           /* tamaño máximo */
    width: 70%;                 /* proporcional, puedes ajustar */
    height: auto;
}
/* Responsive */
@media (max-width: 768px) {
    .layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .sidebar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .main {
        padding: 1.2rem 1rem;
    }
	.btn-link-gestion {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: #f9fafb;
    color: #111827;
    font-size: 0.85rem;
    text-decoration: none;
    gap: 0.3rem;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-link-gestion:hover {
    background: #e0f2fe;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(148, 163, 184, 0.4);
}

.btn-link-gestion .icon {
    font-size: 0.9rem;
}
.bg-auth {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: 
        linear-gradient(rgba(15,23,42,0.6), rgba(15,23,42,0.7)),
        url('bg1.jpg') no-repeat center center fixed;
    background-size: cover;
}
}
