/* =====================================================
   NE Cake Gallery POS — self-contained stylesheet
   (same brand palette as cake-admin, register-first layout
   instead of the multi-module sidebar shell)
===================================================== */
:root {
    --pos-blue: #1A2D8C;
    --pos-blue-dark: #162473;
    --pos-yellow: #FFED00;
    --pos-cream: #fffdf0;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f2f2f2;
    color: var(--pos-blue);
}

a { color: var(--pos-blue); }

/* =====================================================
   BUTTONS
===================================================== */
.btn-primary {
    background: var(--pos-blue);
    color: var(--pos-yellow);
    padding: 12px 18px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 15px;
}
.btn-primary:hover { background: var(--pos-blue-dark); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
    background: #eee;
    color: var(--pos-blue);
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-danger {
    background: #b3261e;
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

/* =====================================================
   LOGIN PAGE
===================================================== */
.pos-login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.pos-login-card {
    background: var(--pos-cream);
    padding: 45px 40px;
    border-radius: 18px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.pos-login-card h1 { margin: 0 0 2px; font-size: 22px; }
.pos-login-card h2 { margin: 0 0 24px; font-size: 14px; font-weight: normal; color: #666; }
.pos-login-card form { text-align: left; }
.pos-login-card label { display: block; font-weight: 600; margin: 14px 0 6px; }
.pos-login-card input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 2px solid #e5e5e5;
    background: #f7f7f7;
    font-size: 14px;
}
.pos-login-card input:focus { outline: none; border-color: var(--pos-blue); background: #fff; }
.pos-login-card .btn-primary { width: 100%; margin-top: 18px; }

/* =====================================================
   TOP BAR
===================================================== */
.pos-topbar {
    background: var(--pos-blue);
    color: var(--pos-yellow);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid var(--pos-yellow);
    font-size: 14px;
}
.pos-topbar strong { font-size: 16px; }
.pos-topbar-right { display: flex; align-items: center; gap: 16px; }
.pos-topbar a, .pos-topbar button {
    color: var(--pos-yellow);
    background: none;
    border: none;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
}

/* =====================================================
   CONTAINER / CARD
===================================================== */
.pos-container { padding: 20px; max-width: 1200px; margin: 0 auto; }

.pos-card {
    background: var(--pos-cream);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.pos-card label { display: block; font-weight: 600; margin: 10px 0 6px; }
.pos-card input, .pos-card select, .pos-card textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 2px solid #e5e5e5;
    background: #f7f7f7;
    font-size: 14px;
}
.pos-card input:focus, .pos-card select:focus, .pos-card textarea:focus {
    outline: none;
    border-color: var(--pos-blue);
    background: #fff;
}

/* =====================================================
   REGISTER — two-column layout
===================================================== */
.register-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    align-items: start;
}
@media (max-width: 900px) {
    .register-layout { grid-template-columns: 1fr; }
}

.register-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    font-size: 15px;
    margin-top: 14px;
}
.register-summary .label { color: #666; }
.register-summary .value { text-align: right; font-weight: bold; }
.register-summary .total-row .value { font-size: 22px; color: var(--pos-blue); }

/* =====================================================
   TABLES
===================================================== */
table.pos-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
table.pos-table th, table.pos-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
}
table.pos-table th { color: #666; font-weight: 600; font-size: 12px; text-transform: uppercase; }
table.pos-table input[type="number"] { width: 70px; padding: 4px 6px; }

.search-result-row { cursor: pointer; }
.search-result-row:hover { background: #f0f0ff; }

/* =====================================================
   MODAL
===================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.modal-content {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    width: 360px;
    max-width: 92vw;
}
.modal-content.modal-wide { width: 560px; }

/* =====================================================
   MESSAGES / TOASTS
===================================================== */
.error-message {
    background: #fdecea;
    color: #b3261e;
    padding: 10px 14px;
    border-radius: 8px;
    margin-top: 14px;
    font-size: 14px;
}
.muted { color: #888; font-size: 13px; }

#toast-container {
    position: fixed;
    z-index: 9999;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    max-width: 320px;
    pointer-events: none;
}
.toast {
    min-width: 250px;
    padding: 14px 18px;
    border-radius: 8px;
    text-align: center;
    color: #fff;
    font-size: 14px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
    background: #666;
}
.toast.success { background: #2e7d32; }
.toast.error { background: #b3261e; }
.toast.info { background: var(--pos-blue); }
.toast.show { opacity: 1; transform: translateY(0); }
