/* ==========================================================================
   SUGSA ADMIN PANEL & LOGIN DESIGN SYSTEM
   Base Framework: Bootstrap 5.3.3
   ========================================================================== */

/* --- GOOGLE FONTS & GLOBAL PROPERTIES --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Playfair+Display:wght@700;900&display=swap');

:root {
    /* Brand Colors */
    --navy-900: #0A1F38;
    --navy-800: #0F2C46;
    --navy-700: #14365A;
    --navy-600: #1E5A8A;
    --gold-600: #B8895C;
    --gold-500: #D4A574;
    --gold-400: #E0B98B;
    --gold-100: #FAEDD9;
    --cream: #FAF6F0;
    
    /* Font Families */
    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

/* --- GLOBAL STYLES --- */
body {
    font-family: var(--font-sans);
    margin: 0;
    background-color: var(--cream);
    color: var(--navy-900);
    height: 100vh;
    overflow: hidden;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 500;
    vertical-align: middle;
}

.fill-1 {
    font-variation-settings: 'FILL' 1, 'wght' 600;
}

/* Custom Webkit Scrollbars */
*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
*::-webkit-scrollbar-thumb {
    background: var(--gold-500);
    border-radius: 3px;
}

/* --- STRUCTURE AND VIEW MANAGEMENT --- */

.view {
    display: none;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.view.active {
    display: flex;
}

/* View Login Page Layout */
#view-login {
    background: linear-gradient(135deg, var(--navy-900), var(--navy-600));
    align-items: center;
    justify-content: center;
}

.login-card {
    max-width: 440px;
    width: 100%;
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 165, 116, 0.2);
}

/* View Dashboard Layout */
#view-dashboard {
    flex-direction: row;
}

.sidebar {
    width: 250px;
    background: linear-gradient(180deg, var(--navy-900), var(--navy-700));
    color: #ffffff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background-color: var(--cream);
}

/* Sub-panels switcher screens */
.screen {
    display: none;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.screen.active {
    display: flex;
}

.screen-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
}

/* --- COMPONENT STYLES --- */

/* Sidebar Navigation Tab Items */
.nav {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-left: 3px solid transparent;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
}

.nav:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.nav.active {
    background: rgba(212, 165, 116, 0.15);
    color: #ffffff;
    border-left-color: var(--gold-500);
    font-weight: 700;
}

.nav .material-symbols-outlined {
    font-size: 19px;
}

/* Typography styles override */
.font-serif {
    font-family: var(--font-serif);
}

.font-sans {
    font-family: var(--font-sans);
}

/* Buttons style */
.btn {
    font-weight: 700;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 12px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s ease-in-out;
}

.btn-p {
    background: var(--navy-800);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 44, 70, 0.2);
}

.btn-p:hover {
    background: var(--navy-900);
    transform: translateY(-1px);
    color: #ffffff;
}

.btn-g {
    background: var(--gold-500);
    color: var(--navy-900);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.25);
}

.btn-g:hover {
    background: var(--gold-600);
    color: #ffffff;
}

.btn-o {
    background: #ffffff;
    color: var(--navy-800);
    border: 1.5px solid #E7DFD0;
}

.btn-o:hover {
    border-color: var(--navy-800);
    color: var(--navy-800);
}

/* Forms & inputs override */
input:not([type="checkbox"]):not([type="radio"]):not(.form-check-input), textarea, select {
    font-size: 12px !important;
    border: 1.5px solid #E7DFD0 !important;
    border-radius: 9px !important;
    padding: 9px 12px !important;
    outline: none !important;
    background: #ffffff !important;
    color: var(--navy-900) !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--gold-500) !important;
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.15) !important;
}

/* Logo styling */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.logo .icon {
    width: 36px;
    height: 36px;
    background: #ffffff;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.logo .icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo .name {
    font-weight: 950;
    font-size: 17px;
    letter-spacing: .12em;
    color: var(--navy-900);
}

.logo.inv .name {
    color: #ffffff;
}

.logo.lg .icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    padding: 6px;
}

.logo.lg .name {
    font-size: 36px;
}

/* Statistics cards */
.stat {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    border-top: 1px solid #E7DFD0;
    border-right: 1px solid #E7DFD0;
    border-bottom: 1px solid #E7DFD0;
    border-left: 4px solid #E7DFD0;
    height: 100%;
}

.stat.stat-navy  { border-left-color: var(--navy-900) !important; }
.stat.stat-gold  { border-left-color: var(--gold-600)  !important; }
.stat.stat-green { border-left-color: #16A34A          !important; }
.stat.stat-amber { border-left-color: #F59E0B          !important; }

.stat h4 {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6B7280;
    font-weight: 700;
    margin: 0 0 6px 0;
}

.stat .v {
    font-size: 26px;
    font-weight: 900;
    color: var(--navy-900);
    font-family: var(--font-serif);
    line-height: 1.2;
}

/* Chip tags */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: var(--gold-100);
    border: 1px solid var(--gold-500);
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 600;
    color: #92400E;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.15s ease;
}

.chip-n {
    background: var(--navy-800);
    border-color: var(--navy-800);
    color: var(--gold-500);
}

.chip-g {
    background: #DCFCE7;
    border-color: #16A34A;
    color: #14532D;
}

/* Custom styled tables for listings */
.tbl {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 11px;
}

.tbl thead th {
    background: var(--gold-100);
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    color: var(--navy-900);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 2px solid var(--gold-500);
}

.tbl tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #F2DEC4;
    vertical-align: middle;
}

.tbl tbody tr:hover {
    background: #FAF6F0;
}

/* Dish image wrapper card items */
.dish {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dish-wrap {
    position: relative;
    overflow: hidden;
    background: #E7DFD0;
    height: 190px;        /* fixed image height for all plato cards */
    flex-shrink: 0;
}

.dish-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.35));
    pointer-events: none;
}

/* Plato card – uniform height in 3-col grid */
.plato-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #E7DFD0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.plato-card:hover {
    box-shadow: 0 6px 24px rgba(10, 31, 56, 0.10);
    transform: translateY(-2px);
}

.plato-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Nuevo plato button card */
.plato-add-card {
    background: #ffffff;
    border-radius: 12px;
    border: 2px dashed var(--gold-500);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    height: 100%;
    width: 100%;
    color: var(--gold-600);
    cursor: pointer;
    transition: background 0.15s ease;
}

.plato-add-card:hover {
    background: var(--cream);
}

/* Alert Blinking kitchen pulse animation */
@keyframes pulse {
    0% {
        transform: scale(.7);
        opacity: 1;
    }
    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

.pulse {
    position: relative;
    width: 12px;
    height: 12px;
}

.pulse::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #16A34A;
    border-radius: 50%;
    opacity: .5;
    animation: pulse 1.6s ease-out infinite;
}

.pulse::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: #15803D;
    border-radius: 50%;
}

/* Custom background/text utility helpers */
.bg-cream {
    background-color: var(--cream) !important;
}

.bg-navy-800 {
    background-color: var(--navy-800) !important;
}

.bg-gold-500 {
    background-color: var(--gold-500) !important;
}

.bg-gold-100 {
    background-color: var(--gold-100) !important;
}

.text-gold-400 {
    color: var(--gold-400) !important;
}

.text-gold-500 {
    color: var(--gold-500) !important;
}

.text-gold-600 {
    color: var(--gold-600) !important;
}

.text-white\/85 {
    color: rgba(255, 255, 255, 0.85);
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Flex Grid grids template */
.grid-cols-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-cols-5 {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- Weekly Menu Day Cards ---- */
.day-dish-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10.5px;
    font-weight: 500;
    color: var(--navy-900);
    min-width: 0;
}

.day-dish-item span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.day-dish-img {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.day-footer {
    padding: 5px 8px;
    font-size: 9px;
    font-weight: 600;
    border-top: 1px solid rgba(0,0,0,0.07);
    background: var(--cream);
}

/* ============================================================
   UTILITY SHIMS  (replaces Tailwind classes used in templates)
   ============================================================ */

/* --- Font sizes --- */
.text-\[8px\]   { font-size: 8px  !important; }
.text-\[9px\]   { font-size: 9px  !important; }
.text-\[10px\]  { font-size: 10px !important; }
.text-\[11px\]  { font-size: 11px !important; }
.text-\[12px\]  { font-size: 12px !important; }
.text-sm        { font-size: 13px !important; }
.text-base      { font-size: 15px !important; }

/* --- Font weights --- */
.font-bold      { font-weight: 700 !important; }
.font-extrabold { font-weight: 800 !important; }
.font-black     { font-weight: 900 !important; }

/* --- Heights (1 rem = 16px) --- */
.h-2   { height: 8px  !important; }
.h-8   { height: 32px !important; }
.h-28  { height: 112px !important; }
.h-32  { height: 128px !important; }
.h-48  { height: 192px !important; }
.h-100 { height: 100% !important; }

/* --- Widths --- */
.w-8   { width: 32px  !important; }
.w-32  { width: 128px !important; }
.w-64  { width: 256px !important; }

/* --- Min-heights --- */
.min-h-\[260px\] { min-height: 260px !important; }
.min-h-\[280px\] { min-height: 280px !important; }

/* --- Spacing helpers --- */
.px-1\.5 { padding-left: 6px  !important; padding-right: 6px  !important; }
.py-1\.5 { padding-top:  6px  !important; padding-bottom: 6px !important; }
.py-2    { padding-top:  8px  !important; padding-bottom: 8px !important; }
.pt-2    { padding-top:  8px  !important; }
.ms-1    { margin-left:  4px  !important; }
.mt-1    { margin-top:   4px  !important; }
.mt-2    { margin-top:   8px  !important; }
.mb-1    { margin-bottom: 4px !important; }
.mb-2    { margin-bottom: 8px !important; }
.mb-3    { margin-bottom: 12px !important; }

/* --- Color utilities --- */
.text-navy-700  { color: var(--navy-700) !important; }
.text-navy-800  { color: var(--navy-800) !important; }
.text-navy-900  { color: var(--navy-900) !important; }
.text-gold-400  { color: var(--gold-400) !important; }
.text-gold-500  { color: var(--gold-500) !important; }
.text-gold-600  { color: var(--gold-600) !important; }

.bg-navy-600    { background-color: var(--navy-600) !important; }
.bg-navy-700    { background-color: var(--navy-700) !important; }
.bg-navy-800    { background-color: var(--navy-800) !important; }
.bg-navy-900    { background-color: var(--navy-900) !important; }
.bg-gold-400    { background-color: var(--gold-400) !important; }
.bg-gold-500    { background-color: var(--gold-500) !important; }
.bg-gold-600    { background-color: var(--gold-600) !important; }
.bg-gold-100    { background-color: var(--gold-100) !important; }

/* Semi-transparent colours used in sidebar */
.text-white\/50  { color: rgba(255,255,255,.50) !important; }
.text-white\/60  { color: rgba(255,255,255,.60) !important; }
.text-white\/70  { color: rgba(255,255,255,.70) !important; }
.border-white\/10 { border-color: rgba(255,255,255,.10) !important; }

/* Inline-flex rounded circle helper */
.rounded-circle { border-radius: 9999px !important; }

/* Misc display helpers */
.inline-flex { display: inline-flex !important; }

/* --- Bar chart height shim (used in index dashboard) --- */
.chart-bar {
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    width: 100%;
}

/* animate-ping  (live dot in status bar) */
@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}
.animate-ping {
    animation: ping 1.4s cubic-bezier(0,0,.2,1) infinite;
}

/* border-b / border-t shims (used in templates) */
.border-b { border-bottom: 1px solid #E7DFD0 !important; }
.border-t  { border-top:   1px solid #E7DFD0 !important; }

/* gap helpers */
.gap-1 { gap: 4px  !important; }
.gap-2 { gap: 8px  !important; }
.gap-3 { gap: 12px !important; }

/* flex helpers */
.flex-grow-1   { flex-grow:    1 !important; }
.flex-shrink-0 { flex-shrink:  0 !important; }
.flex-column   { flex-direction: column !important; }