:root {
    --adam-primary: #2f5f54;
    --adam-primary-dark: #1f463d;
    --adam-primary-soft: #4f7d70;
    --adam-secondary: #83bdac;
    --adam-secondary-light: #cce7df;
    --adam-bg: #f3f8f6;
    --adam-bg-deep: #eaf3ef;
    --adam-surface: rgba(255, 255, 255, 0.88);
    --adam-white: #ffffff;
    --adam-light: #edf6f2;
    --adam-text: #17241f;
    --adam-muted: #61736d;
    --adam-border: #d7e6e1;
    --adam-success: #e7f6ed;
    --adam-success-text: #21613e;
    --adam-warning: #fff4dd;
    --adam-warning-text: #875b0b;
    --adam-error: #fdecea;
    --adam-error-text: #963c34;
    --adam-info: #eaf2fc;
    --adam-info-text: #315e96;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 30px;
    --shadow-xs: 0 6px 18px rgba(35, 77, 66, 0.045);
    --shadow-sm: 0 12px 30px rgba(35, 77, 66, 0.065);
    --shadow-md: 0 20px 50px rgba(35, 77, 66, 0.095);
    --shadow-lg: 0 34px 90px rgba(35, 77, 66, 0.14);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--adam-text);
    background: var(--adam-bg);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 0; color-scheme: light; background: var(--adam-bg); scroll-behavior: smooth; }
body {
    position: relative;
    isolation: isolate;
    min-width: 0;
    min-height: 100vh;
    margin: 0;
    overflow-x: clip;
    color: var(--adam-text);
    background: linear-gradient(180deg, #fbfdfc 0%, var(--adam-bg) 46%, var(--adam-bg-deep) 100%);
    line-height: 1.55;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
body::before {
    content: "";
    position: fixed;
    inset: -24%;
    z-index: 0;
    pointer-events: none;
    opacity: .9;
    background:
        radial-gradient(circle at 12% 14%, rgba(131,189,172,.36), transparent 30%),
        radial-gradient(circle at 88% 20%, rgba(47,95,84,.22), transparent 34%),
        radial-gradient(circle at 72% 79%, rgba(179,224,211,.34), transparent 31%),
        radial-gradient(circle at 18% 86%, rgba(218,238,231,.45), transparent 28%);
    filter: blur(120px);
    will-change: transform;
    animation: adam-aurora 22s ease-in-out infinite;
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: .28;
    background-image:
        linear-gradient(rgba(47,95,84,.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(47,95,84,.022) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, transparent, black 12%, black 85%, transparent);
}
img, svg { max-width: 100%; }
a { color: var(--adam-primary); text-underline-offset: .18em; }
a:hover { color: var(--adam-primary-dark); }
button, input, textarea, select { font: inherit; }
[hidden] { display: none !important; }

h1, h2, h3 { color: var(--adam-primary-dark); line-height: 1.15; text-wrap: balance; }
h1 { margin: 0; font-size: clamp(2.35rem, 5vw, 3.4rem); font-weight: 820; letter-spacing: -.045em; }
h2 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); letter-spacing: -.02em; }
h3 { font-size: 1.05rem; }
p { text-wrap: pretty; }
.eyebrow { margin: 0 0 .65rem; color: var(--adam-primary); font-size: .77rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.hint, footer, small { color: var(--adam-muted); font-size: .88rem; }

.container { width: min(calc(100% - 2.5rem), 940px); margin: 3rem auto; }
.admin-container { width: min(calc(100% - 2rem), 1440px); margin: 2rem auto; }
.card {
    position: relative;
    padding: clamp(1.5rem, 4vw, 3rem);
    overflow: hidden;
    border: 1px solid rgba(115,164,151,.23);
    border-radius: var(--radius-xl);
    background: var(--adam-surface);
    box-shadow: 0 14px 38px rgba(32,74,63,.06), 0 38px 95px rgba(32,74,63,.105);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}
.upload-card { isolation: isolate; }
.upload-card::before { content: ""; position: absolute; inset: 0 auto auto 0; width: 100%; height: 10rem; z-index: -1; background: linear-gradient(180deg, rgba(224,240,234,.45), transparent); pointer-events: none; }
.upload-page-header { position: relative; z-index: 1; }
.upload-intro { max-width: 720px; }
.upload-intro-text { max-width: 680px; margin: 1.05rem 0 0; color: var(--adam-muted); font-size: 1.04rem; line-height: 1.72; }
.brand-header { display: flex; justify-content: center; margin-bottom: 2.5rem; }
.brand-logo { display: block; width: min(300px, 82%); height: auto; filter: drop-shadow(0 8px 18px rgba(47,95,84,.09)); }
.login-card { width: min(100%, 510px); margin: 4rem auto; }

.notice { margin: 1.5rem 0; padding: 1rem 1.15rem; border: 1px solid transparent; border-radius: var(--radius-md); }
.notice.success, .success { border-color: rgba(45,130,82,.16); background: var(--adam-success); color: var(--adam-success-text); }
.notice.error, .error { border-color: rgba(170,66,55,.16); background: var(--adam-error); color: var(--adam-error-text); }

.product-context {
    position: relative;
    display: grid;
    grid-template-columns: 175px minmax(0,1fr);
    gap: 2.2rem;
    align-items: center;
    margin: 2.35rem 0;
    padding: 2rem;
    overflow: hidden;
    border: 1px solid rgba(47,95,84,.12);
    border-radius: 30px;
    background: radial-gradient(circle at 94% 6%, rgba(131,189,172,.3), transparent 18rem), linear-gradient(145deg, rgba(255,255,255,.98), rgba(236,246,242,.88));
    box-shadow: 0 20px 54px rgba(35,77,66,.105);
    animation: product-context-enter 680ms cubic-bezier(.2,.8,.2,1) both;
    transition: transform 240ms ease, box-shadow 240ms ease;
}
.product-context::before { content: ""; position: absolute; inset: -55%; z-index: 0; pointer-events: none; background: radial-gradient(circle, rgba(255,255,255,.5), transparent 58%); transform: translateX(-52%) rotate(17deg); transition: transform 900ms ease; }
.product-context:hover { transform: translateY(-5px); box-shadow: 0 32px 74px rgba(35,77,66,.15); }
.product-context:hover::before { transform: translateX(28%) rotate(17deg); }
.product-context-media, .product-context-content { position: relative; z-index: 1; }
.product-context-media { aspect-ratio: 1; overflow: hidden; border: 1px solid rgba(47,95,84,.09); border-radius: 25px; background: white; box-shadow: inset 0 0 0 1px rgba(47,95,84,.025), 0 18px 40px rgba(35,77,66,.12); }
.product-context-media img { display: block; width: 100%; height: 100%; padding: .8rem; object-fit: contain; transition: transform 380ms ease; }
.product-context:hover .product-context-media img { transform: scale(1.045) rotate(-.4deg); }
.product-context-content { min-width: 0; }
.product-context-eyebrow { margin: 0 0 .5rem; color: var(--adam-primary); font-size: .77rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.product-context-name { margin: 0; overflow-wrap: anywhere; font-size: clamp(1.45rem, 3.2vw, 2rem); letter-spacing: -.025em; }
.product-context-hmv { display: inline-flex; width: fit-content; margin-top: .92rem; padding: .48rem .86rem; border: 1px solid rgba(47,95,84,.12); border-radius: 999px; background: rgba(237,245,242,.96); color: var(--adam-primary-dark); font-size: .82rem; font-weight: 820; }
.product-context-note { display: flex; gap: .82rem; align-items: flex-start; margin-top: 1.1rem; padding: 1rem 1.1rem; border: 1px solid rgba(131,189,172,.2); border-radius: 18px; background: rgba(237,245,242,.78); }
.product-context-note p { margin: 0; color: var(--adam-muted); font-size: .91rem; line-height: 1.58; }
.product-context-note strong { display: block; margin-bottom: .15rem; color: var(--adam-primary-dark); }
.product-context-check { display: inline-grid; flex: 0 0 auto; place-items: center; width: 1.85rem; height: 1.85rem; border-radius: 50%; background: linear-gradient(135deg, var(--adam-primary), var(--adam-secondary)); color: white; font-size: .8rem; font-weight: 900; box-shadow: 0 8px 19px rgba(47,95,84,.25); }

form { display: grid; gap: 1.35rem; margin-top: 2rem; }
.form-section { display: grid; gap: 1.2rem; padding: clamp(1.15rem,2.5vw,1.55rem); border: 1px solid rgba(47,95,84,.11); border-radius: 24px; background: linear-gradient(145deg, rgba(255,255,255,.97), rgba(238,246,243,.54)); box-shadow: 0 15px 40px rgba(35,77,66,.055); transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease; }
.form-section:hover { border-color: rgba(47,95,84,.18); transform: translateY(-3px); box-shadow: 0 22px 52px rgba(35,77,66,.085); }
.form-section-header { display: flex; gap: 1rem; align-items: center; padding-bottom: 1.1rem; border-bottom: 1px solid var(--adam-border); }
.form-section-header h2 { margin: 0; font-size: 1.22rem; }
.form-section-header p { margin: .24rem 0 0; color: var(--adam-muted); font-size: .89rem; }
.form-section-number { display: inline-grid; flex: 0 0 auto; place-items: center; width: 2.65rem; height: 2.65rem; border-radius: 50%; background: linear-gradient(135deg, var(--adam-primary), var(--adam-secondary)); color: white; font-size: .89rem; font-weight: 850; box-shadow: 0 10px 24px rgba(47,95,84,.23); }
.form-field { display: grid; gap: .55rem; min-width: 0; }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.1rem; }
label { color: var(--adam-primary-dark); font-size: .92rem; font-weight: 780; }
input[type="text"], input[type="date"], input[type="email"], input[type="tel"], input[type="password"], input[type="search"], textarea, select { width: 100%; min-width: 0; min-height: 3.35rem; padding: .95rem 1.05rem; border: 1px solid #c8dad4; border-radius: 16px; outline: none; background: rgba(255,255,255,.96); color: var(--adam-text); font: inherit; box-shadow: inset 0 1px 0 rgba(255,255,255,.85); transition: border-color 200ms ease, box-shadow 200ms ease, background-color 200ms ease; }
textarea { min-height: 8rem; resize: vertical; line-height: 1.55; }
select { cursor: pointer; }
input:hover, textarea:hover, select:hover { border-color: #a9c9bf; }
input:focus, textarea:focus, select:focus { border-color: var(--adam-primary); background: white; box-shadow: 0 0 0 4px rgba(131,189,172,.2), 0 12px 28px rgba(47,95,84,.075); }
input:user-invalid, textarea:user-invalid, select:user-invalid { border-color: rgba(163,65,55,.65); box-shadow: 0 0 0 3px rgba(253,236,234,.8); }
::placeholder { color: #93a59f; }
.checkbox { display: flex; gap: .82rem; align-items: flex-start; font-weight: 400; }
.checkbox input[type="checkbox"] { flex: 0 0 auto; width: 1.3rem; height: 1.3rem; margin: .1rem 0 0; accent-color: var(--adam-primary); cursor: pointer; }
.callback-toggle, .consent-checkbox { padding: 1.05rem; border: 1px solid var(--adam-border); border-radius: 18px; background: rgba(255,255,255,.94); }
.callback-toggle { cursor: pointer; transition: 200ms ease; }
.callback-toggle:hover { border-color: rgba(47,95,84,.27); transform: translateY(-2px); box-shadow: var(--shadow-xs); }
.callback-toggle-content { display: grid; gap: .2rem; }
.callback-toggle-content strong { color: var(--adam-primary-dark); }
.callback-toggle-content small { color: var(--adam-muted); line-height: 1.46; }
.callback-options { overflow: hidden; opacity: 0; max-height: 0; padding: 0 1rem; border: 1px solid transparent; border-radius: 18px; background: var(--adam-light); transform: translateY(-8px); transition: opacity 250ms ease, max-height 250ms ease, padding 250ms ease, border-color 250ms ease, transform 250ms ease; }
.callback-options.show { opacity: 1; max-height: 220px; padding: 1rem; border-color: rgba(47,95,84,.1); transform: translateY(0); }

.upload-fieldset { display: grid; min-width: 0; gap: 1.05rem; margin: 0; padding: 0; border: 0; }
.upload-zone { position: relative; display: grid; place-items: center; gap: .46rem; min-height: 17rem; padding: 2rem; overflow: hidden; border: 2px dashed rgba(47,95,84,.27); border-radius: 25px; background: radial-gradient(circle at 50% 2%, rgba(131,189,172,.24), transparent 12rem), linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,251,249,.98)); text-align: center; cursor: pointer; transition: transform 230ms ease, border-color 230ms ease, background 230ms ease, box-shadow 230ms ease; }
.upload-zone:hover, .upload-zone:focus-within { border-color: var(--adam-primary); transform: translateY(-4px); box-shadow: 0 23px 52px rgba(47,95,84,.13); }
.upload-zone.is-dragging { border-color: var(--adam-primary); background: radial-gradient(circle at center, rgba(131,189,172,.36), transparent 16rem), var(--adam-light); transform: scale(1.014); box-shadow: 0 24px 60px rgba(47,95,84,.19); }
.upload-zone-icon { position: relative; z-index: 1; display: inline-grid; place-items: center; width: 5.5rem; height: 5.5rem; margin-bottom: .42rem; border-radius: 50%; background: linear-gradient(145deg,#f8fcfa,var(--adam-light)); color: var(--adam-primary); box-shadow: 0 16px 36px rgba(47,95,84,.14); animation: upload-float 4.8s ease-in-out infinite; transition: transform 230ms ease, box-shadow 230ms ease; }
.upload-zone:hover .upload-zone-icon, .upload-zone.is-dragging .upload-zone-icon { transform: translateY(-6px) scale(1.04); box-shadow: 0 21px 43px rgba(47,95,84,.19); }
.upload-zone-title { color: var(--adam-primary-dark); font-size: 1.28rem; font-weight: 850; }
.upload-zone-text { color: var(--adam-muted); }
.upload-zone-action { display: inline-flex; margin: .55rem 0; padding: .78rem 1.25rem; border-radius: 999px; background: linear-gradient(135deg,var(--adam-primary),var(--adam-primary-dark)); color: white; font-size: .91rem; font-weight: 820; box-shadow: 0 12px 28px rgba(47,95,84,.22); }
.upload-zone-hint { color: var(--adam-muted); font-size: .82rem; }
.upload-limits { display: flex; flex-wrap: wrap; justify-content: center; gap: .58rem; }
.upload-limits span { display: inline-flex; padding: .45rem .78rem; border: 1px solid var(--adam-border); border-radius: 999px; background: rgba(255,255,255,.95); color: var(--adam-muted); font-size: .78rem; font-weight: 740; box-shadow: var(--shadow-xs); }
.visually-hidden, .visually-hidden-file { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; border: 0 !important; white-space: nowrap !important; }
.selected-files { display: grid; gap: .76rem; margin: 0; padding: 0; list-style: none; }
.selected-files li { display: flex; gap: 1rem; align-items: center; justify-content: space-between; min-width: 0; padding: .95rem 1.05rem; border: 1px solid var(--adam-border); border-radius: 16px; background: rgba(255,255,255,.96); box-shadow: 0 9px 23px rgba(47,95,84,.055); animation: file-appear 340ms cubic-bezier(.2,.8,.2,1) both; }

button, .button-link { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .58rem; min-height: 2.9rem; padding: .8rem 1.12rem; overflow: hidden; border: 0; border-radius: 13px; background: var(--adam-primary); color: white; font: inherit; font-weight: 780; text-align: center; text-decoration: none; cursor: pointer; box-shadow: 0 10px 24px rgba(47,95,84,.16); transition: background-color 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease; }
button::before, .secure-submit-button::before { content: ""; position: absolute; top: 0; left: -120%; width: 55%; height: 100%; pointer-events: none; background: linear-gradient(90deg,transparent,rgba(255,255,255,.28),transparent); transition: left 720ms ease; }
button:hover::before, .secure-submit-button:hover::before { left: 145%; }
button:hover, .button-link:hover { background: var(--adam-primary-dark); color: white; transform: translateY(-2px); box-shadow: 0 15px 31px rgba(47,95,84,.24); }
button:disabled { opacity: 1; cursor: not-allowed; transform: none; background: linear-gradient(135deg,#a7c0b8,#8ea9a1); color: rgba(255,255,255,.92); box-shadow: 0 8px 20px rgba(47,95,84,.1); }
.button-link { background: #eef4f2; color: var(--adam-primary-dark); box-shadow: none; }
.secure-submit-button { min-height: 4rem; margin-top: .35rem; border-radius: 17px; background: linear-gradient(135deg,#3a7062,var(--adam-primary-dark)); box-shadow: 0 17px 38px rgba(47,95,84,.25); font-size: 1.02rem; }

.upload-success-panel { display: grid; place-items: center; margin-top: 2.2rem; padding: clamp(1.7rem,4vw,2.8rem); border: 1px solid rgba(47,95,84,.13); border-radius: 28px; background: radial-gradient(circle at 50% 0%, rgba(131,189,172,.26), transparent 18rem), rgba(255,255,255,.94); text-align: center; box-shadow: var(--shadow-md); animation: success-enter 680ms cubic-bezier(.2,.8,.2,1) both; }
.upload-success-icon { display: grid; place-items: center; width: 5.4rem; height: 5.4rem; margin-bottom: 1.2rem; border-radius: 50%; background: linear-gradient(135deg,var(--adam-primary),var(--adam-secondary)); color: white; box-shadow: 0 19px 38px rgba(47,95,84,.24); animation: success-icon 760ms cubic-bezier(.2,.85,.2,1.2) both; }
.upload-footer { margin-top: 2.1rem; padding-top: 1.25rem; border-top: 1px solid var(--adam-border); }

.admin-header { display: flex; gap: 2rem; align-items: center; justify-content: space-between; }
.dashboard-stats, .cockpit-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1rem; margin: 2rem 0; }
.stat-card, .cockpit-stat { padding: 1.4rem; border: 1px solid var(--adam-border); border-radius: 20px; background: rgba(255,255,255,.93); box-shadow: var(--shadow-sm); transition: transform 200ms ease, box-shadow 200ms ease; }
.stat-card:hover, .cockpit-stat:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat-card span, .cockpit-stat span { display: block; color: var(--adam-muted); font-size: .84rem; }
.stat-card strong, .cockpit-stat strong { display: block; margin-top: .42rem; color: var(--adam-primary); font-size: 2.05rem; }
.admin-filter { display: grid; grid-template-columns: minmax(180px,1fr) minmax(180px,240px) auto; gap: .8rem; align-items: end; margin: 1.5rem 0; }
.prescription-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,420px),1fr)); gap: 1.5rem; margin-top: 2rem; }
.prescription-card { position: relative; min-width: 0; padding: 1.55rem; overflow: hidden; border: 1px solid var(--adam-border); border-radius: 24px; background: rgba(255,255,255,.95); box-shadow: 0 16px 46px rgba(47,95,84,.085); animation: card-appear 450ms ease both; transition: transform 250ms ease, box-shadow 250ms ease; }
.prescription-card:hover { transform: translateY(-5px); box-shadow: 0 26px 72px rgba(47,95,84,.15); }
.prescription-card-header { display: flex; gap: 1.35rem; align-items: flex-start; }
.product-image { flex: 0 0 auto; width: 112px; height: 112px; border: 1px solid var(--adam-border); border-radius: 21px; background: white; object-fit: contain; }
.prescription-main { min-width: 0; flex: 1; }
.card-actions { display: grid; gap: .74rem; margin-top: 1.4rem; }
.status-badge { display: inline-flex; width: fit-content; align-items: center; padding: .37rem .76rem; border-radius: 999px; font-size: .78rem; font-weight: 820; }
.status-new { background: var(--adam-success); color: var(--adam-success-text); }
.status-processing { background: var(--adam-warning); color: var(--adam-warning-text); }
.status-completed { background: var(--adam-info); color: var(--adam-info-text); }
.status-rejected { background: var(--adam-error); color: var(--adam-error-text); }
.table-wrapper { overflow-x: auto; border-radius: 16px; background: white; box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { padding: .95rem; border-bottom: 1px solid #e5ece9; text-align: left; vertical-align: top; }
th { color: var(--adam-primary-dark); white-space: nowrap; }
tbody tr:hover { background: var(--adam-light); }
td form { margin: 0; }
.detail-header { display: flex; gap: 2rem; align-items: center; margin-bottom: 2rem; }
.detail-product-image { width: 180px; height: 180px; border: 1px solid var(--adam-border); border-radius: 25px; background: white; object-fit: contain; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.5rem; }
.detail-box { padding: 1.55rem; border: 1px solid var(--adam-border); border-radius: 21px; background: rgba(255,255,255,.93); box-shadow: 0 11px 31px rgba(47,95,84,.065); }
.file-cards, .preview-grid { display: grid; gap: 1rem; margin-top: 1rem; }
.preview-grid { grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); }
.file-card, .preview-card { padding: 1rem; border: 1px solid var(--adam-border); border-radius: 19px; background: white; transition: transform 200ms ease, box-shadow 200ms ease; }
.file-card { display: flex; gap: 1rem; align-items: center; }
.file-card:hover, .preview-card:hover { transform: translateY(-3px); box-shadow: 0 16px 42px rgba(47,95,84,.115); }
.timeline { display: grid; gap: 0; margin-top: 1rem; }
.timeline-item { position: relative; display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 0; border-bottom: 1px solid var(--adam-border); }
.timeline-dot { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--adam-secondary); color: var(--adam-primary-dark); font-weight: 850; }

.reveal { opacity: 0; transform: translateY(25px); transition: opacity 650ms ease, transform 650ms cubic-bezier(.2,.8,.2,1); }
.reveal.visible { opacity: 1; transform: none; }

@keyframes adam-aurora {

0%{
transform:translate3d(-4%,-2%,0) scale(1) rotate(0deg);
filter:blur(90px);
}

25%{
transform:translate3d(5%,3%,0) scale(1.08) rotate(1deg);
filter:blur(105px);
}

50%{
transform:translate3d(-3%,6%,0) scale(1.15) rotate(-1deg);
filter:blur(95px);
}

75%{
transform:translate3d(4%,-3%,0) scale(1.05) rotate(1deg);
filter:blur(105px);
}

100%{
transform:translate3d(-5%,4%,0) scale(1.12) rotate(-1deg);
filter:blur(90px);
}

}

@keyframes product-context-enter { from { opacity: 0; transform: translateY(15px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes upload-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes file-appear { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes card-appear { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes success-enter { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes success-icon { from { opacity: 0; transform: scale(.55) rotate(-18deg); } to { opacity: 1; transform: none; } }

@media (max-width: 960px) {
    .container { width: min(calc(100% - 2rem),860px); }
    .product-context { grid-template-columns: 145px minmax(0,1fr); gap: 1.6rem; }
    .dashboard-stats, .cockpit-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .admin-filter { grid-template-columns: 1fr 1fr; }
    .admin-filter button { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
    .container, .admin-container { width: min(calc(100% - 1rem),100%); margin: .5rem auto; }
    .card { padding: 1.2rem; border-radius: 24px; }
    .field-grid, .detail-grid { grid-template-columns: 1fr; }
    .product-context { grid-template-columns: 105px minmax(0,1fr); gap: 1.05rem; padding: 1.1rem; }
    .product-context-note { grid-column: 1 / -1; }
    .admin-header { flex-direction: column; align-items: flex-start; }
    .file-card { flex-direction: column; align-items: stretch; }
}
@media (max-width: 540px) {
    h1 { font-size: 2.15rem; }
    .dashboard-stats, .cockpit-stats, .admin-filter { grid-template-columns: 1fr; }
    .product-context { display: block; }
    .product-context-media { width: 125px; margin-bottom: 1rem; }
    .form-section { padding: 1rem; }
    .upload-zone { min-height: 15rem; padding: 1.25rem; }
    .upload-limits { justify-content: flex-start; }
    .prescription-card-header { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
}

/* ==========================================================
   ADAM AURORA BACKGROUND
========================================================== */

.site-background{
    position:fixed;
    inset:0;
    overflow:hidden;
    z-index:-10;
    pointer-events:none;
    background:linear-gradient(
        180deg,
        #fbfdfc 0%,
        #f3f8f6 45%,
        #edf5f2 100%
    );
}

.blob{
    position:absolute;
    border-radius:50%;
    filter:blur(120px);
    opacity:.75;
    animation:blobFloat 22s ease-in-out infinite alternate;
}

.blob-1{
    width:700px;
    height:700px;
    left:-220px;
    top:-180px;
    background:#8cc9b8;
}

.blob-2{
    width:900px;
    height:900px;
    right:-350px;
    top:120px;
    background:#d6efe6;
    animation-duration:28s;
}

.blob-3{
    width:750px;
    height:750px;
    left:35%;
    bottom:-320px;
    background:#6fae9a;
    animation-duration:34s;
}

@keyframes blobFloat{

0%{
transform:
translate3d(0,0,0)
scale(1)
rotate(0deg);
}

25%{
transform:
translate3d(140px,-90px,0)
scale(1.18)
rotate(10deg);
}

50%{
transform:
translate3d(-120px,120px,0)
scale(.88)
rotate(-12deg);
}

75%{
transform:
translate3d(160px,60px,0)
scale(1.12)
rotate(8deg);
}

100%{
transform:
translate3d(-80px,-110px,0)
scale(1.05)
rotate(-10deg);
}

}

@keyframes cardFloat{
0%{transform:translateY(0);}
50%{transform:translateY(-4px);}
100%{transform:translateY(0);}
}

.product-context{
animation:cardFloat 8s ease-in-out infinite;
}

.form-section{
transition:
transform .35s ease,
box-shadow .35s ease;
}

.form-section:hover{
transform:translateY(-3px);
box-shadow:0 20px 45px rgba(47,95,84,.12);
}

button{
transition:
all .25s ease;
}

button:hover{
transform:translateY(-2px);
}


.upload-zone{
transition:
all .35s ease;
}

.upload-zone:hover{
transform:scale(1.01);
border-color:#83bdac;
box-shadow:0 20px 60px rgba(47,95,84,.12);
}


input:focus,
textarea:focus,
select:focus{

transform:translateY(-1px);

box-shadow:
0 0 0 4px rgba(131,189,172,.18),
0 12px 30px rgba(47,95,84,.10);

}

/* SUCCESS V2 START */

.success-v2 {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding:
        clamp(2rem, 5vw, 3.5rem);
    border-color:
        rgba(47, 95, 84, 0.16);
    background:
        radial-gradient(
            circle at 50% 0,
            rgba(131, 189, 172, 0.3),
            transparent 20rem
        ),
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.98),
            rgba(237, 246, 242, 0.94)
        );
}

.success-v2::before {
    content: "";
    position: absolute;
    inset: -40%;
    z-index: -1;
    pointer-events: none;
    background:
        conic-gradient(
            from 120deg,
            transparent,
            rgba(131, 189, 172, 0.12),
            transparent 35%
        );
    animation:
        success-background-turn
        16s
        linear
        infinite;
}

.success-v2 .upload-success-icon {
    position: relative;
    width: 6rem;
    height: 6rem;
    margin-bottom: 1.4rem;
}

.success-v2 .upload-success-icon::after {
    content: "";
    position: absolute;
    inset: -0.7rem;
    z-index: -1;
    border:
        1px solid
        rgba(47, 95, 84, 0.14);
    border-radius: 50%;
    animation:
        success-ring
        2.6s
        ease-out
        infinite;
}

.success-check-path {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation:
        success-check-draw
        700ms
        350ms
        ease-out
        forwards;
}

.success-v2 h2 {
    max-width: 700px;
    margin: 0;
    font-size:
        clamp(2rem, 5vw, 3rem);
}

.success-lead {
    max-width: 620px;
    margin:
        1rem auto
        0;
    color: var(--adam-muted);
    font-size: 1.04rem;
    line-height: 1.7;
}

.success-message {
    max-width: 620px;
    margin:
        0.75rem auto
        0;
    color: var(--adam-primary-dark);
    font-weight: 700;
}

.success-v2 .upload-reference {
    position: relative;
    width:
        min(100%, 470px);
    margin:
        1.8rem auto;
    padding:
        1.25rem;
    border:
        1px solid
        rgba(47, 95, 84, 0.15);
    background:
        rgba(255, 255, 255, 0.82);
    box-shadow:
        0 15px 38px
        rgba(47, 95, 84, 0.08);
    backdrop-filter:
        blur(14px);
    -webkit-backdrop-filter:
        blur(14px);
}

.success-v2 .upload-reference code {
    display: block;
    padding:
        0.25rem 0;
    font-size:
        clamp(1.3rem, 4vw, 1.65rem);
    letter-spacing: 0.065em;
    user-select: all;
}

.success-v2 .upload-reference small {
    color: var(--adam-muted);
}

.success-v2 .upload-next-steps {
    width:
        min(100%, 650px);
    margin-top: 1.3rem;
}

.success-v2 .upload-next-steps h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.success-v2 .upload-next-steps ol {
    counter-reset: none;
}

.success-v2 .upload-next-steps li {
    align-items: flex-start;
    padding: 1.1rem;
    text-align: left;
    box-shadow:
        0 8px 24px
        rgba(47, 95, 84, 0.045);
    animation:
        success-step-enter
        600ms
        cubic-bezier(.2, .8, .2, 1)
        both;
}

.success-v2 .upload-next-steps li:nth-child(1) {
    animation-delay: 250ms;
}

.success-v2 .upload-next-steps li:nth-child(2) {
    animation-delay: 400ms;
}

.success-v2 .upload-next-steps li:nth-child(3) {
    animation-delay: 550ms;
}

.success-v2 .upload-next-steps li > span {
    width: 2.1rem;
    height: 2.1rem;
    background:
        linear-gradient(
            135deg,
            var(--adam-primary),
            var(--adam-secondary)
        );
    box-shadow:
        0 8px 18px
        rgba(47, 95, 84, 0.19);
}

.success-actions {
    display: grid;
    place-items: center;
    gap: 0.85rem;
    width:
        min(100%, 470px);
    margin-top: 1.5rem;
}

.success-primary-action {
    width: 100%;
    min-height: 3.5rem;
    background:
        linear-gradient(
            135deg,
            var(--adam-primary),
            var(--adam-primary-dark)
        );
    color: white;
    box-shadow:
        0 14px 32px
        rgba(47, 95, 84, 0.22);
}

.success-actions p {
    margin: 0;
    color: var(--adam-muted);
    font-size: 0.82rem;
}

.success-celebration {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.success-celebration span {
    position: absolute;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--adam-secondary);
    opacity: 0;
    animation:
        success-particle
        1.5s
        ease-out
        forwards;
}

.success-celebration span:nth-child(1) {
    top: 11%;
    left: 17%;
    animation-delay: 300ms;
}

.success-celebration span:nth-child(2) {
    top: 18%;
    right: 16%;
    width: 0.4rem;
    height: 0.4rem;
    animation-delay: 450ms;
}

.success-celebration span:nth-child(3) {
    top: 7%;
    left: 67%;
    width: 0.35rem;
    height: 0.35rem;
    animation-delay: 600ms;
}

@keyframes success-check-draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes success-ring {
    0% {
        opacity: 0.55;
        transform: scale(0.75);
    }

    75%,
    100% {
        opacity: 0;
        transform: scale(1.3);
    }
}

@keyframes success-step-enter {
    from {
        opacity: 0;
        transform:
            translateY(15px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes success-particle {
    0% {
        opacity: 0;
        transform:
            translateY(0)
            scale(0.4);
    }

    35% {
        opacity: 0.65;
    }

    100% {
        opacity: 0;
        transform:
            translateY(-35px)
            scale(1.3);
    }
}

@keyframes success-background-turn {
    to {
        transform: rotate(360deg);
    }
}

/* SUCCESS V2 END */

/* SUCCESS POLISH START */

.success-v2 .upload-success-icon {
    color: #ffffff;
}

.success-v2 .upload-success-icon svg {
    display: block;
    overflow: visible;
}

.success-v2 .success-check-path {
    fill: none;
    stroke: currentColor;
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation:
        success-check-draw
        700ms
        300ms
        ease-out
        forwards;
}

.success-v2 .upload-next-steps ol {
    display: grid;
    gap: 0.9rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.success-v2 .upload-next-steps li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin: 0;
    padding: 1.1rem;
    border: 1px solid var(--adam-border);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 9px 26px
        rgba(47, 95, 84, 0.06);
    transition:
        transform 200ms ease,
        border-color 200ms ease,
        box-shadow 200ms ease;
}

.success-v2 .upload-next-steps li:hover {
    border-color:
        rgba(47, 95, 84, 0.22);
    transform: translateY(-2px);
    box-shadow:
        0 15px 34px
        rgba(47, 95, 84, 0.1);
}

.success-step-icon {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 50%;
    background:
        linear-gradient(
            135deg,
            var(--adam-primary),
            var(--adam-secondary)
        );
    color: #ffffff;
    box-shadow:
        0 9px 20px
        rgba(47, 95, 84, 0.2);
}

.success-v2 .upload-next-steps li > div {
    min-width: 0;
}

.success-v2 .upload-next-steps li strong {
    display: block;
    color: var(--adam-primary-dark);
}

.success-v2 .upload-next-steps li p {
    margin: 0.35rem 0 0;
    color: var(--adam-muted);
    line-height: 1.55;
}

.reference-copy-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    margin: 0.45rem 0;
}

.reference-copy-row code {
    margin: 0 !important;
}

.reference-copy-button {
    min-height: 2.55rem;
    padding: 0.58rem 0.8rem;
    border: 1px solid var(--adam-border);
    border-radius: 11px;
    background: var(--adam-light);
    color: var(--adam-primary-dark);
    font-size: 0.82rem;
    box-shadow: none;
}

.reference-copy-button::before {
    display: none;
}

.reference-copy-button:hover {
    border-color: var(--adam-primary);
    background: var(--adam-primary);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow:
        0 9px 20px
        rgba(47, 95, 84, 0.16);
}

.copy-status {
    min-height: 1.3em;
    margin: 0.45rem 0 0;
    color: var(--adam-success-text);
    font-size: 0.8rem;
    font-weight: 750;
}

.success-primary-action {
    min-height: 3.5rem;
    font-size: 0.98rem;
}

.success-contact-panel {
    width: 100%;
    margin-top: 0.6rem;
    padding: 1.15rem;
    border: 1px solid var(--adam-border);
    border-radius: 18px;
    background:
        rgba(255, 255, 255, 0.76);
    box-shadow:
        0 10px 28px
        rgba(47, 95, 84, 0.055);
}

.success-response-note {
    margin: 0;
    color: var(--adam-muted);
    line-height: 1.55;
}

.success-response-note strong {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--adam-primary-dark);
}

.success-contact-links {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    margin-top: 0.9rem;
}

.success-contact-links a {
    display: inline-flex;
    gap: 0.55rem;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 3rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--adam-border);
    border-radius: 13px;
    background: var(--adam-white);
    color: var(--adam-primary-dark);
    font-size: 0.84rem;
    font-weight: 760;
    text-decoration: none;
    transition:
        border-color 180ms ease,
        color 180ms ease,
        transform 180ms ease,
        box-shadow 180ms ease;
}

.success-contact-links a:hover {
    border-color: var(--adam-primary);
    color: var(--adam-primary);
    transform: translateY(-2px);
    box-shadow:
        0 10px 24px
        rgba(47, 95, 84, 0.1);
}

.success-contact-links span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.success-close-note {
    margin: 0 !important;
    color: var(--adam-muted);
    font-size: 0.8rem;
}

@media (max-width: 620px) {
    .reference-copy-row {
        flex-direction: column;
    }

    .reference-copy-button {
        width: 100%;
    }

    .success-contact-links {
        grid-template-columns: 1fr;
    }
}

/* SUCCESS POLISH END */

.privacy-link {
    color: var(--adam-primary);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.14em;
}

.privacy-link:hover {
    color: var(--adam-primary-dark);
}
