/* Global variables & Color Palette */
:root {
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #f97316; /* Amber orange for chicken theme */
    --primary-hover: #ea580c;
    --primary-gradient: linear-gradient(135deg, #f97316 0%, #d97706 100%);
    --accent-gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    
    --success: #10b981;
    --danger: #ef4444;
    --info: #06b6d4;
    --warning: #f59e0b;
    
    --line-bg: #8cafd0; /* Classic LINE blue/grey chat background */
    --line-green: #06c755; /* LINE logo green */
    --line-bubble: #ffffff;
    --line-user-bubble: #a7f3d0;
    --line-dark-bg: #1e2530;
    --line-border: rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', 'Inter', 'Sarabun', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 10% 20%, rgba(249, 115, 22, 0.05) 0px, transparent 50%),
        radial-gradient(at 90% 80%, rgba(251, 191, 36, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
}

.app-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* ================= LEFT COLUMN: LINE SIMULATOR ================= */
.simulator-panel {
    width: 420px;
    min-width: 420px;
    background: rgba(15, 23, 42, 0.6);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* iPhone Frame container styling */
.iphone-frame {
    width: 360px;
    height: 740px;
    background: #1e293b;
    border: 12px solid #334155;
    border-radius: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.iphone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 22px;
    background: #334155;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    z-index: 100;
}

.iphone-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: var(--line-bg);
}

/* LINE chat Header styling */
.line-header {
    background-color: #2b3647;
    height: 65px;
    padding: 22px 15px 5px 15px; /* Account for notch space */
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    z-index: 10;
}

.line-back {
    font-size: 18px;
    cursor: pointer;
}

.line-chat-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
    margin-left: 15px;
}

.bot-avatar {
    font-size: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bot-name {
    font-size: 14px;
    font-weight: 600;
}

.bot-status {
    font-size: 10px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.status-dot.online {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.line-actions {
    display: flex;
    gap: 15px;
    font-size: 16px;
    cursor: pointer;
}

/* LINE Chat Body */
.line-chat-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
}

.chat-system-msg {
    align-self: center;
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255,255,255,0.8);
    font-size: 11px;
    padding: 3px 12px;
    border-radius: 12px;
}

.message-bubble {
    display: flex;
    gap: 8px;
    max-width: 85%;
    align-items: flex-start;
}

.message-bubble.bot {
    align-self: flex-start;
}

.message-bubble.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.bubble-avatar {
    font-size: 20px;
    background: #ffffff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bubble-content-wrapper {
    display: flex;
    flex-direction: column;
}

.message-bubble.user .bubble-content-wrapper {
    align-items: flex-end;
}

.bubble-text {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message-bubble.bot .bubble-text {
    background-color: var(--line-bubble);
    color: #111827;
    border-top-left-radius: 4px;
}

.message-bubble.user .bubble-text {
    background-color: var(--line-green);
    color: white;
    border-top-right-radius: 4px;
}

.bubble-img {
    max-width: 180px;
    max-height: 180px;
    border-radius: 8px;
    margin-bottom: 4px;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.1);
}

.bubble-time {
    font-size: 9px;
    color: rgba(0,0,0,0.4);
    margin-top: 2px;
    padding: 0 4px;
}
.message-bubble.user .bubble-time {
    color: rgba(255,255,255,0.7);
}

/* Quick Replies */
.quick-replies-container {
    display: flex;
    gap: 8px;
    padding: 10px 15px;
    overflow-x: auto;
    background: transparent;
    scrollbar-width: none;
}
.quick-replies-container::-webkit-scrollbar {
    display: none;
}

.quick-reply-btn {
    background-color: #ffffff;
    color: var(--line-green);
    border: 1px solid var(--line-green);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.quick-reply-btn:hover {
    background-color: var(--line-green);
    color: white;
}

/* LINE input bar */
.line-input-bar {
    background-color: #f4f4f4;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #ddd;
    z-index: 10;
}

.menu-toggle-btn, .image-upload-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s;
}

.menu-toggle-btn.active, .menu-toggle-btn:hover, .image-upload-btn:hover {
    color: var(--line-green);
}

.line-input-wrapper {
    flex-grow: 1;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 4px 10px 4px 15px;
    display: flex;
    align-items: center;
}

.line-input-wrapper input {
    flex-grow: 1;
    border: none;
    outline: none;
    font-size: 13px;
    color: #333;
    background: transparent;
}

.line-input-wrapper button {
    background: none;
    border: none;
    color: var(--line-green);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
}

/* LINE Rich Menu */
.rich-menu-panel {
    background-color: #2b3647;
    height: 220px;
    transition: transform 0.3s ease-in-out;
    display: block;
}

.rich-menu-panel.hidden {
    display: none;
}

.rich-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 110px);
    height: 100%;
}

.rich-menu-item {
    border: 0.5px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.rich-menu-item:hover {
    background-color: rgba(255,255,255,0.08);
}

.rich-menu-icon {
    font-size: 28px;
    margin-bottom: 5px;
}

.rich-menu-label {
    font-size: 11px;
    color: var(--text-primary);
    font-weight: 500;
    text-align: center;
}

/* Simulator controls */
.simulator-controls {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    width: 360px;
}

.control-btn {
    flex: 1;
    border: none;
    padding: 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: transform 0.1s, opacity 0.2s;
    color: white;
}
.control-btn:active {
    transform: scale(0.95);
}
.control-btn.warning {
    background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);
}
.control-btn.info {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

/* ================= RIGHT COLUMN: DASHBOARD ================= */
.dashboard-panel {
    flex-grow: 1;
    padding: 30px;
    overflow-y: auto;
    height: 100vh;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.logo-emoji {
    font-size: 36px;
    margin-right: 12px;
}

.dashboard-header h1 {
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

.header-controls {
    display: flex;
    gap: 15px;
}

.control-group {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
}

.control-group label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.control-group select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 13px;
    outline: none;
    cursor: pointer;
}

/* Status Banner */
.store-status-banner {
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}

.store-status-banner.open {
    background-color: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}
.store-status-banner.open .status-indicator {
    background-color: #10b981;
    box-shadow: 0 0 10px #10b981;
}

.store-status-banner.closed {
    background-color: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}
.store-status-banner.closed .status-indicator {
    background-color: #ef4444;
    box-shadow: 0 0 10px #ef4444;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Filter bar */
.dashboard-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
}

.session-selector select {
    background: #0f172a;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    outline: none;
    font-weight: 500;
    cursor: pointer;
}

.status-badges {
    display: flex;
    gap: 8px;
}

.badge {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Stat Cards */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    backdrop-filter: blur(10px);
    transition: transform 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-card.sales .card-icon {
    background: rgba(249, 115, 22, 0.15);
    color: var(--primary);
}

.stat-card.expenses .card-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.stat-card.profit .card-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.card-info {
    flex-grow: 1;
}

.card-info h3 {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 24px;
    font-weight: 700;
    margin-top: 4px;
}

.card-trend {
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    align-self: flex-start;
}
.card-trend.upward {
    background: rgba(249, 115, 22, 0.1);
    color: var(--primary);
}
.card-trend.downward {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}
.card-trend.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}
.card-trend.negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Grid Sections (Tables, lists, cards) */
.grid-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.grid-section h2 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.grid-section.sales-breakdown {
    grid-column: span 2;
}

.grid-section.expense-breakdown {
    grid-column: span 1;
}

/* Table styling */
.table-container {
    max-height: 250px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th {
    position: sticky;
    top: 0;
    background: #1e293b;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.pad-20 { padding: 20px; }

/* Expense list styling */
.expense-list-container {
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.expense-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.expense-title {
    font-size: 13px;
    font-weight: 600;
}

.expense-time {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.expense-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.expense-amount {
    font-size: 14px;
    font-weight: 700;
    color: var(--danger);
}

.expense-img-btn {
    background: rgba(249, 115, 22, 0.1);
    color: var(--primary);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.expense-img-btn:hover {
    background: var(--primary);
    color: white;
}

/* Stock Card */
.stock-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    height: calc(100% - 30px);
    display: flex;
    flex-direction: column;
}

.stock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stock-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.stock-badge.sufficient {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.stock-badge.insufficient {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.stock-badge.empty {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.stock-time {
    font-size: 10px;
    color: var(--text-muted);
}

.stock-body h4 {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

#stockList {
    list-style: none;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#stockList li {
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#stockList li::before {
    content: "•";
    color: var(--primary);
    font-size: 18px;
}

/* Contents Brainstorm list */
.contents-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 180px;
    overflow-y: auto;
}

.content-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px 15px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.content-icon {
    font-size: 18px;
    color: var(--primary);
    background: rgba(249, 115, 22, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-details {
    flex-grow: 1;
}

.content-details .idea {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.content-details .time {
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Reflections / notes section */
.grid-section.reflections-section {
    grid-column: span 3;
}

.reflections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.reflection-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.ref-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.reflection-box h4 {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reflection-box p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.9);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #1e293b;
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close-modal:hover {
    color: white;
}

#modalImg {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#modalTitle {
    font-size: 14px;
    color: var(--text-primary);
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Menu & Ingredients Section Styles */
.grid-section.menu-ingredients-section {
    grid-column: span 3;
}

.menu-ingredients-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.ingredients-container h3, .recipes-container h3 {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
}

.recipes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 250px;
    overflow-y: auto;
}

.recipe-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px 15px;
}

.recipe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.recipe-price {
    font-size: 11px;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.05);
    padding: 2px 8px;
    border-radius: 6px;
}

.recipe-ingredients-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ing-badge {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10.5px;
    color: var(--text-secondary);
}

.replenish-btn {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.replenish-btn:hover {
    background: #10b981;
    color: white;
}

.stock-warning-row td {
    color: #f59e0b;
}

.stock-warning-row td:first-child::after {
    content: " ⚠️";
    color: #f59e0b;
}

/* Flex Message Simulator CSS */
.message-bubble.bot .flex-bubble-body {
    background-color: #ffffff;
    border-radius: 12px;
    border-top-left-radius: 4px;
    color: #111827;
    width: 260px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flex-bubble-header {
    font-size: 13px;
    font-weight: 700;
    color: #06c755;
    border-bottom: 1.5px solid #eee;
    padding-bottom: 8px;
    text-align: center;
}

.flex-bubble-desc {
    font-size: 11px;
    color: #4b5563;
    line-height: 1.4;
}

.flex-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 5px 0;
}

.flex-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 0.5px solid #f3f4f6;
    padding-bottom: 6px;
}

.flex-item-name {
    font-size: 12px;
    font-weight: 500;
    color: #1f2937;
}

.flex-counter-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flex-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    background-color: #f9fafb;
    color: #374151;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    outline: none;
}

.flex-btn:hover {
    background-color: #e5e7eb;
}

.flex-btn:active {
    transform: scale(0.9);
}

.flex-count-val {
    font-size: 12px;
    font-weight: 700;
    width: 16px;
    text-align: center;
    color: #111827;
}

.flex-bubble-footer {
    margin-top: 5px;
}

.flex-checkout-btn {
    width: 100%;
    background: linear-gradient(135deg, #06c755 0%, #05b04b 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(6, 199, 85, 0.2);
}

.flex-checkout-btn:hover:not(:disabled) {
    opacity: 0.9;
}

.flex-checkout-btn:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}

.flex-checkout-btn:active:not(:disabled) {
    transform: scale(0.98);
}

/* ================= CUSTOM STOCK REPORT TAB STYLES ================= */

/* Navigation Tabs */
.dashboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px 8px 0 0;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(249, 115, 22, 0.05);
}

.tab-content {
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stock Report Layout Grid */
.stock-meter-row {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px 20px;
    display: grid;
    grid-template-columns: 180px 1fr 130px 90px;
    align-items: center;
    gap: 20px;
    transition: all 0.2s ease;
}

.stock-meter-row:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.stock-meter-row.critical-border {
    border-left: 4px solid var(--danger);
    background: rgba(239, 68, 68, 0.02);
}

.stock-meter-row.warning-border {
    border-left: 4px solid var(--warning);
    background: rgba(245, 158, 11, 0.02);
}

.stock-meter-row.safe-border {
    border-left: 4px solid var(--success);
}

.stock-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stock-item-icon {
    font-size: 20px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stock-item-name {
    font-weight: 600;
    font-size: 14px;
}

.stock-item-sub {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Visual Progress Bar */
.progress-bar-wrapper {
    width: 100%;
}

.progress-bar-track {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar-fill.critical {
    background: linear-gradient(90deg, #ef4444, #f87171);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.progress-bar-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.progress-bar-fill.safe {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.progress-labels-row {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Status Badge Styles */
.stock-status-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    display: inline-block;
}

.stock-status-pill.critical {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.stock-status-pill.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.stock-status-pill.safe {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Shopping paper list */
.shopping-list-item {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(217, 119, 6, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
}

.shopping-list-item i {
    color: #ea580c;
    font-size: 12px;
}

.recipe-quick-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.recipe-quick-card:hover {
    background: rgba(249, 115, 22, 0.05);
    border-color: rgba(249, 115, 22, 0.2);
}

.recipe-quick-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 5px;
}

.recipe-quick-ings {
    color: var(--text-secondary);
    font-size: 11px;
}

/* ================= LOGIN SCREEN STYLING ================= */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    text-align: center;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-logo {
    font-size: 56px;
    display: block;
    margin-bottom: 15px;
}

.login-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.login-form .form-group {
    text-align: left;
    margin-bottom: 20px;
}

.login-form label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
}

.login-form input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 16px;
    color: white;
    font-size: 15px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
    background: rgba(15, 23, 42, 0.9);
}

.login-error-msg {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    padding: 10px;
    font-size: 12px;
    margin-bottom: 20px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-submit-btn:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}

.login-submit-btn:active {
    transform: translateY(1px);
}

/* Logout Button */
.logout-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
}

.logout-btn:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}




