/* Menú del Día - Estilos principales */

:root {
    --primary: #e85d04;
    --primary-dark: #d45404;
    --secondary: #1a1a2e;
    --sidebar-width: 260px;
    --header-height: 64px;
    --bg-light: #f4f6f9;
    --card-shadow: 0 2px 12px rgba(0,0,0,.08);
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-light);
    color: #333;
    margin: 0;
}

/* Login */
.login-page {
    background: linear-gradient(135deg, var(--secondary) 0%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container { width: 100%; max-width: 420px; }

.login-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,.3);
}

.login-header {
    background: linear-gradient(135deg, var(--primary), #f48c06);
    color: #fff;
    padding: 40px 30px;
    text-align: center;
}

.login-icon { font-size: 3rem; margin-bottom: 10px; }
.login-header h1 { font-size: 1.8rem; margin: 0; font-weight: 700; }
.login-header p { margin: 8px 0 0; opacity: .85; }
.login-body { padding: 30px; }
.btn-login { background: var(--primary); border: none; padding: 12px; font-weight: 600; }
.btn-login:hover { background: var(--primary-dark); }

/* App Layout */
.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: var(--secondary);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: transform .3s ease;
}

.sidebar-brand {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.brand-icon { font-size: 2rem; }
.sidebar-brand strong { display: block; font-size: 1rem; }
.sidebar-brand small { color: rgba(255,255,255,.6); font-size: .75rem; }

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 4px;
    transition: all .2s;
    font-size: .95rem;
}

.nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; font-weight: 600; }
.nav-item i { font-size: 1.2rem; width: 24px; text-align: center; }

.sidebar-footer { padding: 12px; border-top: 1px solid rgba(255,255,255,.1); }

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-header {
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.header-title h1 { font-size: 1.25rem; margin: 0; font-weight: 600; }
.header-user { margin-left: auto; display: flex; align-items: center; }
.sidebar-toggle { color: var(--secondary); padding: 0; margin-right: 12px; }

.page-content { padding: 24px; flex: 1; }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1040;
}

/* Cards */
.content-card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}

.content-card .card-header {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 16px 20px;
    border-radius: var(--radius) var(--radius) 0 0 !important;
}

.content-card .card-header h5 { font-weight: 600; }

/* Stats */
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--primary);
}

.stat-primary { border-left-color: var(--primary); }
.stat-secondary { border-left-color: var(--secondary); }
.stat-success { border-left-color: #28a745; }
.stat-info { border-left-color: #17a2b8; }

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(232,93,4,.1);
    color: var(--primary);
}

.stat-secondary .stat-icon { background: rgba(26,26,46,.1); color: var(--secondary); }
.stat-success .stat-icon { background: rgba(40,167,69,.1); color: #28a745; }
.stat-info .stat-icon { background: rgba(23,162,184,.1); color: #17a2b8; }

.stat-info h3 { font-size: 1.8rem; margin: 0; font-weight: 700; }
.stat-info p { margin: 0; color: #6c757d; font-size: .9rem; }

/* Quick Links */
.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: #f8f9fa;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--secondary);
    transition: all .2s;
    text-align: center;
    height: 100%;
    border: 2px solid transparent;
}

.quick-link:hover {
    background: #fff;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--card-shadow);
}

.quick-link i { font-size: 2rem; margin-bottom: 8px; }
.quick-link span { font-weight: 600; font-size: .9rem; }

.quick-link-highlight {
    background: linear-gradient(135deg, rgba(232,93,4,.1), rgba(244,140,6,.1));
    border-color: var(--primary);
}

.quick-link-highlight:hover { background: var(--primary); color: #fff; }

/* Buttons */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Images */
.settings-logo-preview {
    max-width: 120px;
    max-height: 120px;
    border-radius: 12px;
    object-fit: contain;
    border: 2px solid #eee;
}

.settings-bg-preview {
    width: 100%;
    max-height: 180px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #eee;
}

.settings-logo-placeholder {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 0 auto;
}

.color-dot {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    margin: 0 4px;
}

.dish-thumb {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.dish-thumb-sm {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.dish-thumb-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.history-thumb {
    width: 50px;
    height: 70px;
    border-radius: 6px;
    object-fit: cover;
}

.history-thumb-placeholder {
    font-size: 1.5rem;
}

/* Dish Select Cards */
.dish-select-card {
    border: 2px solid #e9ecef;
    border-radius: var(--radius);
    padding: 16px;
    transition: all .2s;
    cursor: pointer;
    height: 100%;
}

.dish-select-card:hover { border-color: #ccc; }
.dish-select-card.selected { border-color: var(--primary); background: rgba(232,93,4,.04); }

.dish-name {
    font-weight: 600;
    cursor: pointer;
    display: block;
    margin-bottom: 4px;
}

.dish-desc { font-size: .85rem; color: #6c757d; margin: 4px 0 0; }

.sticky-panel { position: sticky; top: calc(var(--header-height) + 24px); }

/* Menu Preview */
.preview-container { background: #1a1a2e; border-radius: 0 0 var(--radius) var(--radius); padding: 20px; }

.menu-preview-img {
    max-width: 100%;
    max-height: 600px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,.3);
}

.share-text-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    font-size: .95rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Empty State */
.empty-state {
    text-align: center;
    color: #6c757d;
    padding: 40px 20px;
}

.empty-state i { font-size: 3rem; display: block; margin-bottom: 12px; opacity: .5; }

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.show { display: block; }
    .main-content { margin-left: 0; }
    .page-content { padding: 16px; }
}

@media (max-width: 575.98px) {
    .stat-card { padding: 16px; }
    .stat-info h3 { font-size: 1.4rem; }
    .menu-preview-img { max-height: 450px; }
}
