/* =========================================================
   NUSUON WORKSTATION PORTAL
   FILE: theme.css
   VERSION: 1.0

   PURPOSE:
   - Centralized PUBLIC portal design system
   - Corporate colors and typography
   - Shared buttons, cards, links, and forms
   - Does not modify internal Workstation shell
========================================================= */

:root {
    --nw-green: #15965c;
    --nw-green-dark: #107a4b;
    --nw-green-light: #eff9f3;

    --nw-blue: #123f73;
    --nw-text: #243449;
    --nw-muted: #64748b;

    --nw-white: #ffffff;
    --nw-background: #f8faf9;
    --nw-border: #dce8e1;

    --nw-gold-light: #fff5b5;
    --nw-gold-bright: #ffe56c;
    --nw-gold-main: #ffd43b;
    --nw-gold-deep: #f4bd24;
    --nw-gold-text: #513800;

    --nw-radius: 12px;
    --nw-radius-small: 8px;

    --nw-shadow:
        0 10px 32px rgba(18, 63, 115, 0.08);

    --nw-font:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    /* Compatibility with existing sign-in CSS */
    --crm-orange: var(--nw-green);
    --crm-orange-dark: var(--nw-green-dark);
    --crm-blue: var(--nw-blue);
}

/* =========================================================
   BASE
========================================================= */

html {
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    background: var(--nw-background);
    color: var(--nw-text);
    font-family: var(--nw-font);
    line-height: 1.5;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: var(--nw-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button,
a,
input {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid var(--nw-green);
    outline-offset: 3px;
}

/* =========================================================
   COMMON TYPOGRAPHY
========================================================= */

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

h1,
h2,
h3,
h4 {
    color: var(--nw-blue);
    line-height: 1.2;
}

p {
    line-height: 1.55;
}

/* =========================================================
   SHARED SURFACES
========================================================= */

.nw-card {
    background: var(--nw-white);
    border: 1px solid var(--nw-border);
    border-radius: var(--nw-radius);
    box-shadow: var(--nw-shadow);
}

/* =========================================================
   SHARED BUTTONS
========================================================= */

.nw-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 0;
    border-radius: var(--nw-radius-small);
    background: var(--nw-green);
    color: var(--nw-white);
    font-weight: 700;
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.nw-button:hover {
    background: var(--nw-green-dark);
    color: var(--nw-white);
    text-decoration: none;
}

.nw-button:active {
    transform: translateY(1px);
}

/* =========================================================
   PREMIUM GOLD TRIAL BUTTON
========================================================= */

.nw-gold-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 12px 18px;

    background: linear-gradient(
        110deg,
        #ffe78a 0%,
        #fff5bd 28%,
        #ffd43b 55%,
        #fff2a1 78%,
        #f4bd24 100%
    );

    border: 1px solid #e3b52d;
    border-radius: 9px;

    color: var(--nw-gold-text);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.025em;
    text-align: center;
    white-space: nowrap;

    box-shadow:
        0 3px 10px rgba(183, 139, 19, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);

    transition:
        filter 0.2s ease,
        transform 0.2s ease;
}

.nw-gold-cta:hover {
    filter: brightness(1.05);
    color: var(--nw-gold-text);
    text-decoration: none;
    transform: translateY(-1px);
}

/* =========================================================
   COMMON FORM CONTROLS
========================================================= */

.nw-input {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 11px 13px;
    border: 1px solid var(--nw-border);
    border-radius: var(--nw-radius-small);
    background: var(--nw-white);
    color: var(--nw-text);
}

.nw-input:focus {
    border-color: var(--nw-green);
    outline: 2px solid rgba(21, 150, 92, 0.15);
}

/* =========================================================
   SECURITY LABEL
========================================================= */

.nw-secure-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--nw-green-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-align: center;
}

/* =========================================================
   RESPONSIVE TYPOGRAPHY
========================================================= */

@media (max-width: 480px) {
    .nw-gold-cta {
        font-size: 12px;
        padding: 12px 8px;
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nw-button,
    .nw-gold-cta {
        transition: none;
    }
}