:root {
    --admin-primary: #ff9300;
    --admin-bg: #f4f7f6;
    --menu-bg: #ffffff;
    --accent-red: #ff0000;
}

/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--admin-bg);
    color: #333;
}

#main-container {
    display: flex;
    height: 100vh;
}

/* --- Dashboard (Left Side) --- */
#dashboard {
    flex: 1;
    background: white;
    padding: 30px;
    overflow-y: auto;
    border-right: 2px solid #ddd;
}

.section-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #eee;
}

h2 {
    font-size: 1.2rem; 
    margin-bottom: 15px; 
    border-bottom: 2px solid var(--admin-primary); 
    padding-bottom: 5px; 
}

.control-group { margin-bottom: 15px; }

label { 
    display: block; 
    font-size: 0.85rem; 
    font-weight: bold; 
    margin-bottom: 5px; 
}

input[type="text"], input[type="number"], select {
    width: 100%; 
    padding: 8px; 
    border: 1px solid #ccc; 
    border-radius: 4px;
}

.btn-group { display: flex; gap: 5px; }

.btn-small { 
    padding: 8px; 
    flex: 1; 
    cursor: pointer; 
    border: 1px solid #ccc; 
    background: white; 
    border-radius: 4px; 
}

.btn-small.active { 
    background: var(--admin-primary); 
    color: white; 
    border-color: var(--admin-primary); 
}

.item-row { 
    display: flex; 
    gap: 8px; 
    margin-bottom: 8px; 
    align-items: center; 
}

.item-thumb, .item-thumb-empty {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

.item-thumb { object-fit: cover; border: 1px solid #ddd; }

.item-thumb-empty {
    border: 1.5px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #bbb;
    background: #fafafa;
}

.btn-add { 
    width: 100%; 
    padding: 10px; 
    background: #1a1a1a; 
    color: white; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer; 
}

.btn-del { 
    color: red; 
    cursor: pointer; 
    border: none; 
    background: none; 
    font-weight: bold; 
    font-size: 1.2rem; 
}

#json-preview {
    background: #2d3436; 
    color: #fab1a0; 
    padding: 15px; 
    border-radius: 8px;
    font-family: monospace; 
    font-size: 0.75rem; 
    white-space: pre-wrap; 
}

/* --- Phone Preview (Right Side) --- */
#preview-section {
    flex: 1.2;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #e2e8f0;
    padding: 20px;
}

.phone-frame {
    width: 375px; 
    height: 667px;
    background: white;
    border: 12px solid #1a1a1a;
    border-radius: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    overflow: hidden;
    position: relative;
}

.menu-app {
    height: 100%; 
    overflow-y: auto; 
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

.menu-header { 
    display: flex; 
    justify-content: var(--logo-align, center); 
    width: 100%;
    height: var(--logo-height, 150px);
    overflow: hidden;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.logo-img { 
    width: var(--logo-width, 140px); 
    margin-top: var(--logo-mt, 0px); 
    height: auto; 
}

#menu-items-view { padding: 0 20px 20px 20px; }

.cat-title {
    font-family: var(--font-heading);
    font-size: 1.4rem; 
    border-left: 4px solid var(--admin-primary);
    padding-left: 10px; 
    margin: 25px 0 15px 0;
    display: flex; 
    align-items: center;
}

.cat-title::after { 
    content: ''; 
    height: 1px; 
    flex-grow: 1; 
    background: #eee; 
    margin-left: 10px; 
}

.m-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    margin-bottom: 10px; 
    font-family: var(--font-body);
    gap: 10px;
}

.m-item-photo {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.m-item-info { flex: 1; }
.m-price { font-weight: bold; color: var(--accent-red); }

.menu-footer {
    margin-top: 40px;
    padding: 30px 20px;
    background: #fdfdfd;
    border-top: 1px solid #eee;
    text-align: center;
}

.footer-socials { display: flex; justify-content: center; gap: 15px; margin-bottom: 15px; }

.social-link {
    text-decoration: none;
    font-size: 0.8rem;
    color: #555;
    background: #f0f0f0;
    padding: 5px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.copyright-text { font-size: 0.7rem; color: #aaa; }

.decor-icon { 
    position: absolute; 
    opacity: 0.1; 
    font-size: 5rem; 
    z-index: 0; 
    pointer-events: none; 
}