:root {
    --brand-red: #cc161e;
    --brand-red-dark: #a80f15;
    --brand-black: #13130e;
    --surface: #ffffff;
    --page: #f4f6f9;
    --muted: #64748b;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', sans-serif; color: #172033; background: var(--page); }

.access-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; overflow: hidden; position: relative; background: linear-gradient(135deg, #13130e 0%, #380608 48%, #cc161e 100%); }
.glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; pointer-events: none; }
.glow-one { width: 360px; height: 360px; top: -120px; right: -80px; background: #cc161e; }
.glow-two { width: 440px; height: 440px; bottom: -220px; left: -140px; background: #13130e; }
.access-card { width: min(100%, 430px); padding: 42px 40px 30px; color: #fff; border: 1px solid rgba(255,255,255,.18); border-radius: 22px; background: rgba(255,255,255,.1); box-shadow: 0 24px 70px rgba(0,0,0,.4); backdrop-filter: blur(16px); position: relative; z-index: 1; }
.access-logo { display: block; max-width: 190px; max-height: 75px; margin: 0 auto 28px; object-fit: contain; }
.eyebrow { margin: 0 0 9px; font-size: .68rem; font-weight: 700; letter-spacing: .14em; opacity: .72; }
.access-card h1 { margin: 0 0 10px; font-size: 1.8rem; letter-spacing: -.03em; }
.access-copy { margin: 0 0 28px; color: rgba(255,255,255,.72); font-size: .9rem; line-height: 1.6; }
.form-label { margin-bottom: 7px; font-size: .77rem; font-weight: 600; color: rgba(255,255,255,.82); }
.input-wrap { display: flex; align-items: center; gap: 11px; padding: 0 14px; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; background: rgba(255,255,255,.1); }
.input-wrap:focus-within { border-color: var(--brand-red); box-shadow: 0 0 0 3px rgba(204,22,30,.25); }
.input-wrap i { color: rgba(255,255,255,.55); font-size: .86rem; }
.input-wrap input { width: 100%; min-height: 48px; color: #fff; border: 0; outline: 0; background: transparent; }
.input-wrap input::placeholder { color: rgba(255,255,255,.55); }
.btn-brand { padding: 12px 18px; border: 0; border-radius: 999px; color: #fff; background: var(--brand-red); font-weight: 700; letter-spacing: .01em; transition: .2s ease; }
.btn-brand:hover, .btn-brand:focus { color: #fff; background: #f11d27; box-shadow: 0 9px 22px rgba(204,22,30,.35); transform: translateY(-1px); }
.alert-glass { color: #fff; border: 1px solid rgba(255,255,255,.15); background: rgba(220,53,69,.65); }
.access-footer { margin: 28px 0 0; color: rgba(255,255,255,.54); text-align: center; font-size: .72rem; }

.resource-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px clamp(18px, 5vw, 72px); color: #fff; background: linear-gradient(105deg, #13130e, #1a0505 66%, #380608); box-shadow: 0 3px 18px rgba(19,19,14,.18); }
.brand { display: inline-flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; font-size: 1.04rem; font-weight: 700; }
.brand img { width: auto; height: 39px; max-width: 148px; object-fit: contain; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.user-pill { display: inline-flex; align-items: center; gap: 8px; color: rgba(255,255,255,.78); font-size: .8rem; }
.user-avatar { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; color: #fff; background: var(--brand-red); font-weight: 700; }
.logout-link { color: rgba(255,255,255,.65); padding: 6px; }
.logout-link:hover { color: #fff; }
.resource-main { width: min(1500px, 100%); margin: 0 auto; padding: clamp(28px, 5vw, 62px) clamp(18px, 5vw, 72px) 28px; flex: 1; }
.resource-intro { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
.red-eyebrow { color: var(--brand-red); opacity: 1; }
.resource-intro h1 { margin: 0 0 10px; color: #172033; font-size: clamp(1.65rem, 3vw, 2.45rem); letter-spacing: -.04em; }
.resource-intro p:not(.eyebrow) { max-width: 690px; margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.7; }
.intro-button { flex-shrink: 0; }
.viewer-card { overflow: hidden; border: 1px solid #e2e8f0; border-radius: 16px; background: var(--surface); box-shadow: 0 12px 34px rgba(23,32,51,.08); }
.viewer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 22px; border-bottom: 1px solid #edf0f4; }
.viewer-toolbar h2 { margin: 0 0 4px; color: #172033; font-size: 1rem; font-weight: 700; }
.viewer-toolbar h2 i { color: var(--brand-red); }
.viewer-toolbar span:not(.secure-label) { color: var(--muted); font-size: .77rem; }
.secure-label { white-space: nowrap; color: #0f766e; font-size: .75rem; font-weight: 600; }
.drive-frame-wrap { min-height: min(70vh, 780px); background: #f8fafc; }
.drive-frame-wrap iframe { display: block; width: 100%; height: min(70vh, 780px); min-height: 560px; border: 0; }
.viewer-help { display: flex; align-items: center; gap: 0; padding: 13px 20px; color: var(--muted); border-top: 1px solid #edf0f4; font-size: .76rem; line-height: 1.5; }
.viewer-help i { color: var(--brand-red); }
.resource-footer { padding: 0 18px 24px; color: #94a3b8; text-align: center; font-size: .72rem; }
.resource-footer span { padding: 0 7px; }

@media (max-width: 700px) {
    .topbar { align-items: flex-start; flex-direction: column; }
    .topbar-actions { width: 100%; justify-content: space-between; }
    .topbar-actions .btn { font-size: .73rem; }
    .resource-intro { align-items: flex-start; flex-direction: column; }
    .intro-button { width: 100%; }
    .viewer-toolbar { align-items: flex-start; flex-direction: column; }
    .drive-frame-wrap { min-height: 66vh; }
    .drive-frame-wrap iframe { height: 66vh; min-height: 470px; }
    .viewer-help { align-items: flex-start; }
}

@media (max-width: 480px) {
    .access-card { padding: 34px 25px 26px; }
    .brand span { display: none; }
    .user-pill { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
