/* NutriGrow — Estilos globales v1.0 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --ng-green:      #2e7d32;
    --ng-green-dark: #1b5e20;
    --ng-green-light:#4caf50;
    --ng-accent:     #8bc34a;
    --ng-bg:         #f5f7f5;
    --ng-sidebar:    #1b5e20;
    --ng-sidebar-w:  260px;
    --ng-text:       #1c1c1c;
    --ng-muted:      #6b7280;
    --ng-border:     #e0e7df;
    --ng-card-bg:    #ffffff;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    font-size: 0.925rem;
    color: var(--ng-text);
    background: var(--ng-bg);
    margin: 0;
}

/* ── LOGIN ─────────────────────────────────── */
.ng-login-bg {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #388e3c 100%);
    min-height: 100vh;
}
.ng-login-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 16px;
}

/* ── BOTÓN PRINCIPAL ─────────────────────────*/
.btn-ng {
    background: var(--ng-green);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .55rem 1.2rem;
    transition: background .2s;
}
.btn-ng:hover { background: var(--ng-green-dark); color: #fff; }
.btn-ng-outline {
    border: 1.5px solid var(--ng-green);
    color: var(--ng-green);
    border-radius: 8px;
    padding: .5rem 1.1rem;
    background: transparent;
    transition: all .2s;
}
.btn-ng-outline:hover { background: var(--ng-green); color: #fff; }

/* ── LAYOUT DASHBOARD ────────────────────────*/
.ng-wrapper { display: flex; min-height: 100vh; }

/* Sidebar */
.ng-sidebar {
    width: var(--ng-sidebar-w);
    background: var(--ng-sidebar);
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}
.ng-sidebar-logo {
    padding: 1.5rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.ng-sidebar-logo img { height: 36px; }
.ng-sidebar-logo .app-name {
    font-size: .75rem;
    font-weight: 500;
    color: rgba(255,255,255,.55);
    margin-top: .25rem;
}

.ng-nav { padding: 1rem 0; flex: 1; }
.ng-nav-section {
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.4);
    padding: .75rem 1.25rem .35rem;
}
.ng-nav a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem 1.25rem;
    color: rgba(255,255,255,.82);
    text-decoration: none;
    font-size: .875rem;
    border-radius: 0;
    transition: background .15s, color .15s;
}
.ng-nav a:hover,
.ng-nav a.active {
    background: rgba(255,255,255,.1);
    color: #fff;
}
.ng-nav a.active { border-left: 3px solid var(--ng-accent); }
.ng-nav a svg { flex-shrink: 0; opacity: .75; }
.ng-nav a.active svg, .ng-nav a:hover svg { opacity: 1; }

.ng-sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,.12);
    font-size: .8rem;
    color: rgba(255,255,255,.55);
}
.ng-sidebar-footer a { color: rgba(255,255,255,.7); text-decoration: none; }
.ng-sidebar-footer a:hover { color: #fff; }

/* Contenido principal */
.ng-main {
    margin-left: var(--ng-sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Topbar */
.ng-topbar {
    background: #fff;
    border-bottom: 1px solid var(--ng-border);
    padding: .75rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}
.ng-topbar h1 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    color: var(--ng-text);
}
.ng-topbar-right { display: flex; align-items: center; gap: .75rem; }
.ng-user-badge {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    color: var(--ng-muted);
}
.ng-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--ng-green);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
}

/* Área de contenido */
.ng-content { padding: 1.75rem; flex: 1; }

/* ── TARJETAS STAT ────────────────────────── */
.stat-card {
    background: var(--ng-card-bg);
    border-radius: 12px;
    border: 1px solid var(--ng-border);
    padding: 1.25rem 1.5rem;
}
.stat-card .stat-value {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--ng-green);
    line-height: 1;
}
.stat-card .stat-label {
    font-size: .78rem;
    color: var(--ng-muted);
    margin-top: .25rem;
}
.stat-card .stat-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: #e8f5e9;
    display: flex; align-items: center; justify-content: center;
    color: var(--ng-green);
}

/* ── TABLAS ───────────────────────────────── */
.ng-table { width: 100%; border-collapse: collapse; }
.ng-table th {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--ng-muted);
    padding: .65rem 1rem;
    border-bottom: 1px solid var(--ng-border);
    background: #fafafa;
    text-align: left;
}
.ng-table td {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--ng-border);
    vertical-align: middle;
}
.ng-table tr:last-child td { border-bottom: none; }
.ng-table tbody tr:hover { background: #f9fdf9; }

/* ── BADGES ESTADO ────────────────────────── */
.badge-activo    { background: #e8f5e9; color: #2e7d32; }
.badge-suspendido{ background: #fff3e0; color: #e65100; }
.badge-inactivo  { background: #f3f4f6; color: #6b7280; }
.ng-badge {
    display: inline-block;
    padding: .2rem .65rem;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
}

/* ── CARDS GENÉRICAS ──────────────────────── */
.ng-card {
    background: var(--ng-card-bg);
    border-radius: 12px;
    border: 1px solid var(--ng-border);
    overflow: hidden;
}
.ng-card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--ng-border);
    font-weight: 600;
    font-size: .95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ng-card-body { padding: 1.5rem; }

/* ── FORMULARIOS ──────────────────────────── */
.form-label { font-weight: 500; font-size: .85rem; color: #374151; }
.form-control, .form-select {
    border-radius: 8px;
    border: 1.5px solid var(--ng-border);
    font-size: .9rem;
    padding: .45rem .75rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--ng-green);
    box-shadow: 0 0 0 3px rgba(46,125,50,.12);
}

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 768px) {
    .ng-sidebar { transform: translateX(-100%); transition: transform .25s; }
    .ng-sidebar.open { transform: translateX(0); }
    .ng-main { margin-left: 0; }
    .ng-content { padding: 1rem; }
}
