/* Shared styles for shop, login and admin pages — Eastern Plastics brand */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy: #1a2744; --navy-2: #233260; --orange: #e8620a; --orange-2: #f07830;
  --teal: #00a8a8; --grey: #f4f5f7; --line: #e3e7ee; --text: #222831; --muted: #5a6475;
  --ok: #1e8e4e; --warn: #b7791f; --bad: #c0392b; --radius: 10px;
}
body { font-family: 'Segoe UI', Arial, sans-serif; color: var(--text); background: var(--grey); line-height: 1.5; font-size: 15px; }
a { color: var(--orange); }
button, input, select, textarea { font: inherit; }
.hidden { display: none !important; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--navy); height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; gap: 20px; }
.site-header .brand { display: flex; align-items: center; }
.site-header nav { display: flex; gap: 24px; flex: 1; margin-left: 24px; }
.site-header nav a { color: rgba(255,255,255,.8); text-decoration: none; font-size: .9rem; font-weight: 500; }
.site-header nav a:hover, .site-header nav a.active { color: var(--orange); }
.site-header nav a.marine { color: var(--teal); }
.user-area { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.75); font-size: .85rem; white-space: nowrap; }
.user-area a { color: white; text-decoration: none; font-weight: 600; }
.user-area a:hover { color: var(--orange); }
.cart-btn { background: var(--orange); color: white; border: 0; border-radius: 8px; padding: 9px 16px; font-weight: 700; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.cart-btn:hover { background: var(--orange-2); }
.cart-count { background: white; color: var(--orange); border-radius: 10px; padding: 0 7px; font-size: .78rem; }

/* Buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 8px; padding: 9px 16px; font-weight: 600; cursor: pointer; text-decoration: none; font-size: .88rem; }
.btn-primary { background: var(--orange); color: white; } .btn-primary:hover { background: var(--orange-2); }
.btn-dark { background: var(--navy); color: white; } .btn-dark:hover { background: var(--navy-2); }
.btn-ghost { background: white; color: var(--navy); border: 1.5px solid var(--line); } .btn-ghost:hover { border-color: var(--navy); }
.btn-danger { background: white; color: var(--bad); border: 1.5px solid #f0c9c4; } .btn-danger:hover { background: #fdf0ee; }
.btn-sm { padding: 5px 10px; font-size: .8rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.input, select.input, textarea.input { width: 100%; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 8px; background: white; outline: none; }
.input:focus { border-color: var(--orange); }
textarea.input { resize: vertical; min-height: 90px; }
label.field { display: block; margin-bottom: 14px; }
label.field span { display: block; font-size: .78rem; font-weight: 700; color: var(--navy); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .4px; }
.row { display: flex; gap: 14px; } .row > * { flex: 1; }

/* Cards / tables */
.card { background: white; border-radius: var(--radius); box-shadow: 0 1px 6px rgba(0,0,0,.05); padding: 22px; }
table.grid { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.grid th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 10px 10px; border-bottom: 2px solid var(--line); background: #fafbfc; white-space: nowrap; }
table.grid td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.grid tr:last-child td { border-bottom: 0; }
.muted { color: var(--muted); } .small { font-size: .8rem; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 12px; font-size: .75rem; font-weight: 700; }
.pill.ok { background: #e6f5ec; color: var(--ok); } .pill.warn { background: #fdf3e1; color: var(--warn); } .pill.bad { background: #fbeae8; color: var(--bad); }
.pill.navy { background: #e8ebf3; color: var(--navy); }

/* Toast */
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--navy); color: white; padding: 12px 22px; border-radius: 8px; font-weight: 600; font-size: .9rem; z-index: 200; box-shadow: 0 8px 24px rgba(0,0,0,.2); transition: opacity .3s; }
#toast.error { background: var(--bad); }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(10,18,36,.55); z-index: 150; display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; overflow-y: auto; }
.modal { background: white; border-radius: 14px; width: 100%; max-width: 640px; padding: 28px; }
.modal h2 { color: var(--navy); font-size: 1.2rem; margin-bottom: 18px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

footer.mini { text-align: center; color: var(--muted); font-size: .8rem; padding: 30px 16px; }
footer.mini a { color: var(--muted); }

@media (max-width: 860px) {
  .site-header { padding: 0 14px; } .site-header nav { display: none; }
  .row { flex-direction: column; gap: 0; }
}
