:root {
    --bg-color: #f4f4f9;
    --text-color: #333;
    --card-bg: #ffffff;
    --border-color: #333;
    --input-bg: #f9f9f9;
    --primary: #007bff;
    --danger: #dc3545;
    --secondary: #6c757d;
    --wine-red: #722f37;
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --card-bg: #1e1e1e;
    --border-color: #555;
    --input-bg: #2d2d2d;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1.5rem;
    /* ~18pt */
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.4;
}

/* --- Sidebar --- */
.side-menu {
    position: fixed;
    top: 0;
    left: -320px;
    /* Hidden by default */
    width: 300px;
    height: 100%;
    background: var(--card-bg);
    z-index: 2000;
    /* Higher than header */
    transition: left 0.3s ease;
    padding: 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
}

.side-menu.open {
    left: 0;
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1500;
}

.menu-item {
    display: block;
    width: 100%;
    padding: 15px;
    background: none;
    color: var(--text-color);
    text-align: left;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    border-radius: 8px;
    margin-bottom: 10px;
}

.menu-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* --- Header --- */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.hamburger-btn {
    font-size: 36px;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    width: 50px;
}

.app-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

/* --- Page & Form Container --- */
.page {
    display: none;
    width: 95%;
    max-width: 600px;
    margin: 30px auto;
    padding: 30px;
    box-sizing: border-box;
    background: var(--card-bg);
    border-radius: 12px;
}

.page.active {
    display: block;
}

/* --- Responsive Form Layout (Add Bottle) --- */
.clean-form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    text-align: left;
}

.clean-form-group label {
    margin-bottom: 8px;
    font-size: 1.3rem;
    color: var(--text-color);
    font-weight: 400;
}

.clean-form-group input,
.clean-form-group select {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 1.4rem;
    width: 100%;
    box-sizing: border-box;
}

/* Desktop Layout Rules */
@media (min-width: 600px) {
    .clean-form-group {
        flex-direction: row;
        align-items: center;
        margin-bottom: 20px;
    }

    .clean-form-group label {
        width: 180px;
        /* Aligns all inputs vertically */
        margin-bottom: 0;
    }

    .clean-form-group input,
    .clean-form-group select {
        flex: 1;
    }
}

.notes-container {
    margin: 30px 0;
}

.notes-label {
    font-weight: 400;
    margin-bottom: 15px;
    font-size: 1.3rem;
    display: block;
    text-align: left;
}

.notes-container textarea {
    width: 100%;
    height: 180px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.3rem;
    resize: none;
    background: var(--input-bg);
    color: var(--text-color);
    box-sizing: border-box;
}

/* --- Buttons --- */
.action-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

button {
    padding: 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.5rem;
}

button.primary {
    background: var(--primary);
    color: white;
}

button.secondary {
    background: var(--secondary);
    color: white;
}

button.danger {
    background: var(--danger);
    color: white;
}

button.somm {
    background: var(--wine-red);
    color: white;
}

/* --- Status Messages --- */
.status-message {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    border-radius: 10px;
    color: white;
    z-index: 3000;
    display: none;
}

.status-message.success {
    background: #28a745;
}