/*
 * Copyright © 1996 - 2026 Gousse & Gousse Inc. or its Affiliates., All Rights Reserved.
 *  author: Al D. Gousse
 *    site: www.goussecorp.com
 *   email: info@goussecorp.com
 *  twitter: @goussecorp
 **/

:root {
    color-scheme: light;
    --ink: #1f2328;
    --muted: #57606a;
    --border: #d0d7de;
    --bg: #f6f8fa;
    --panel: #ffffff;
    --accent: #8a2c1d;
    --accent-hover: #6e2316;
    --focus: #2563eb;
    --radius: 6px;
}

* {
    box-sizing: border-box;
}

/* Show/hide toggle for password fields — wraps just the <input>, label stays
   outside so it isn't visually affected by the relative positioning. */
.password-field {
    position: relative;
}

.password-field input[type="password"],
.password-field input[type="text"] {
    padding-right: 3.75rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.6rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.25rem 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: none;
    color: var(--accent);
    text-decoration: underline;
}

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: auto;
}

.skip-link:focus {
    position: static;
    display: inline-block;
    margin: 0.5rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

main {
    max-width: 760px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 4rem;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

h2 {
    font-size: 1.1rem;
    margin-top: 2rem;
}

a {
    color: var(--accent);
}

a:hover {
    color: var(--accent-hover);
}

p > a {
    text-decoration: underline;
}

/* The "<p><a>...</a> &middot; <a>...</a></p>" nav line that appears under
   every page's <h1> reads as a proper toolbar instead of a plain sentence. */
nav, p:has(> a) {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 0.85rem;
    margin: 0.5rem 0 1.25rem;
}

p:has(> a) a {
    text-decoration: none;
    font-weight: 500;
}

p:has(> a) a:hover {
    text-decoration: underline;
}

form {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 2px rgb(31 35 40 / 0.06);
}

fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem 1.25rem;
    margin: 0 0 1.25rem;
}

fieldset:disabled {
    opacity: 0.6;
}

legend {
    font-weight: 600;
    padding: 0 0.4rem;
}

label {
    display: block;
    font-weight: 500;
    margin-top: 0.9rem;
    margin-bottom: 0.3rem;
}

fieldset label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    margin-top: 0.5rem;
}

fieldset label:has(input[type="checkbox"]) input {
    margin: 0;
    width: auto;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="file"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    color: var(--ink);
    background: var(--panel);
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
a:focus,
button:focus {
    outline: 2px solid var(--focus);
    outline-offset: 1px;
}

button,
input[type="submit"] {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.55rem 1.2rem;
    border: none;
    border-radius: var(--radius);
    background: var(--accent);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

button:hover {
    background: var(--accent-hover);
}

/* Secondary: lower-emphasis actions (e.g. "Log out") that shouldn't compete
   visually with the primary save/submit action on the same page. */
.btn-secondary {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg);
}

/* Destructive: irreversible actions (e.g. "Delete") get their own color so
   they're never mistaken for the primary action at a glance. */
.btn-danger {
    background: #b91c1c;
}

.btn-danger:hover {
    background: #991b1b;
}

/* Status pill shown via data-status="..." rather than a dynamically-built
   class name, since status strings come straight from the database in a
   mix of formats (UPPER_SNAKE_CASE, Title Case) — matching on the literal
   value is simpler than normalizing it just to build a CSS class. Anything
   not explicitly matched below still renders as a neutral gray pill. */
.badge {
    display: inline-block;
    padding: 0.15rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--muted);
}

.badge[data-status="APPROVED"],
.badge[data-status="PUBLISHED"],
.badge[data-status="Active"] {
    background: #dafbe1;
    border-color: #7ee2a8;
    color: #116329;
}

.badge[data-status="PENDING"],
.badge[data-status="TEXT_REVIEW_PENDING"],
.badge[data-status="IMAGE_REVIEW_PENDING"],
.badge[data-status="FINAL_APPROVAL_PENDING"],
.badge[data-status="NOT_STARTED"] {
    background: #fff8c5;
    border-color: #f2cc60;
    color: #7d5a00;
}

.badge[data-status="REJECTED"],
.badge[data-status="Disabled"] {
    background: #ffebe9;
    border-color: #f1aba3;
    color: #82071e;
}

.badge[data-status="DRAFT"] {
    background: #eef2f6;
    border-color: #d0d7de;
    color: #57606a;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

th, td {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

thead th {
    background: var(--bg);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--muted);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Login/auth screens: a narrow centered card instead of the 760px-wide
   `main` layout meant for admin content pages (tables, product forms) —
   this is the one screen that's just a single short form, so it shouldn't
   stretch to the same width as those. */
.auth-card {
    max-width: 22rem;
    margin: 3.5rem auto;
    padding: 0 1.25rem 3rem;
    text-align: center;
}

.auth-card h1 {
    margin: 0 0 1.25rem;
}

.auth-card form {
    text-align: left;
}

.auth-card button {
    width: 100%;
}

[role="alert"] {
    background: #fdecea;
    border: 1px solid #f1aba3;
    color: #8a2c1d;
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius);
    margin: 0.75rem 0;
}

/* Result banners (e.g. bulk import outcome) — same palette as `.badge`'s
   status colors, so "everything created", "some rows skipped", and
   "nothing happened" read as green/amber/red at a glance. */
.banner {
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin: 0.75rem 0;
}

.banner-success {
    background: #dafbe1;
    border-color: #7ee2a8;
    color: #116329;
}

.banner-warning {
    background: #fff8c5;
    border-color: #f2cc60;
    color: #7d5a00;
}

footer {
    max-width: 760px;
    margin: 2rem auto 0;
    padding: 1.25rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
}

footer nav a {
    margin-right: 0.75rem;
}

.existing-image-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
}

.existing-image-row img {
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.employee-photo-box {
    width: 120px;
    height: 120px;
    margin: 0.3rem 0 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--panel);
}

.employee-photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.employee-photo-box-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
    border-style: dashed;
}

/*
 * Copyright © 1996 - 2026 Gousse & Gousse Inc. or its Affiliates., All Rights Reserved.
 *  author: Al D. Gousse
 *    site: www.goussecorp.com
 *   email: info@goussecorp.com
 *  twitter: @goussecorp
 **/
