:root {
    --navy: #000d44;
    --red: #E20011;
    --bg: #f5f5f7;
    --surface: #ffffff;
    --border: #d2d2d7;
    --text: #1d1d1f;
    --muted: #86868b;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 12px 40px rgba(0, 0, 0, 0.06);
    --radius: 20px;
    --radius-sm: 12px;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background:
        radial-gradient(1200px 600px at 10% -10%, rgba(0, 18, 66, 0.05), transparent 55%),
        radial-gradient(900px 500px at 100% 0%, rgba(229, 0, 25, 0.04), transparent 50%),
        var(--bg);
    color: var(--text);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.page {
    min-height: 100vh;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 28px 40px 48px;
    display: flex;
    flex-direction: column;
}

.page-split {
    padding: 0;
}

.split-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.split-main {
    padding: 28px 36px 48px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.split-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    padding: 48px 40px 40px;
    min-height: 100%;
}

.split-brand-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    margin: auto 0;
}

.split-brand-logo {
    width: min(340px, 58%);
    height: auto;
    display: block;
}

.split-brand-title {
    margin: 0;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: clamp(2.4rem, 4.2vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--navy);
    text-transform: lowercase;
}

.split-brand-footer {
    width: 100%;
    text-align: center;
    margin-top: auto;
    padding-top: 32px;
}

.split-brand-link {
    display: inline-block;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--navy);
    text-decoration: none;
    opacity: 0.92;
}

.split-brand-link:hover {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.split-brand-address {
    margin: 10px 0 0;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.45;
    color: var(--muted);
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 44px;
    height: auto;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-name {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--navy);
}

.brand-subtitle {
    font-size: 0.84rem;
    color: var(--muted);
}

.text-link {
    color: var(--navy);
    font-size: 0.92rem;
    font-weight: 500;
    opacity: 0.8;
}

.text-link:hover { opacity: 1; }

.main-content {
    display: grid;
    gap: 20px;
    flex: 1;
}

.card {
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}

.card-narrow { max-width: none; width: 100%; }
.card-spaced { margin-top: 4px; }
.center { text-align: center; }

.upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.upload-btn { cursor: pointer; margin: 0; }

.upload-progress { margin-top: 12px; }
.upload-progress .meter { margin: 8px 0; }

.login-card { text-align: center; max-width: 480px; margin: 0 auto; }
.login-mark { margin-bottom: 8px; }
.login-logo { width: 96px; height: auto; }
.login-card .form { text-align: left; }

.card-title {
    margin: 0 0 8px;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.035em;
    color: var(--navy);
}

.card-lead {
    margin: 0 0 22px;
    color: var(--muted);
    line-height: 1.55;
    font-size: 0.98rem;
}

.grid-two {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 20px;
    align-items: start;
}

.form { display: grid; gap: 16px; }

.field { display: grid; gap: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field-label {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 500;
}

.input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font: inherit;
    background: #fbfbfd;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s, background .15s;
}

.input:focus {
    outline: none;
    border-color: rgba(0, 18, 66, 0.35);
    box-shadow: 0 0 0 4px rgba(0, 18, 66, 0.08);
    background: #fff;
}

.textarea { resize: vertical; min-height: 110px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 980px;
    padding: 12px 20px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform .12s ease, opacity .12s ease, background .12s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-full { width: 100%; }
.btn-small { padding: 8px 14px; font-size: 0.86rem; }

.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: #001a5c; }
.btn-accent { background: var(--red); color: #fff; }
.btn-accent:hover { background: #cc0016; }
.btn-danger {
    background: #fff;
    color: var(--red);
    border: 1px solid #ffd5da;
}
.btn-ghost {
    background: #f5f5f7;
    color: var(--navy);
}

.dropzone {
    position: relative;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    background: #fbfbfd;
    min-height: 148px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 20px;
    transition: border-color .15s, background .15s;
}

.dropzone.is-dragover {
    border-color: var(--navy);
    background: rgba(0, 18, 66, 0.03);
}

.dropzone-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.dropzone-copy { display: grid; gap: 4px; color: var(--muted); pointer-events: none; }
.dropzone-copy strong { color: var(--text); font-weight: 600; }
.file-names {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.86rem;
    color: var(--muted);
    display: grid;
    gap: 4px;
}

.meter {
    height: 8px;
    background: #ececf0;
    border-radius: 999px;
    overflow: hidden;
    margin: 14px 0 10px;
}

.meter-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--navy), #1a3a8a);
    border-radius: inherit;
    transition: width .3s ease;
}

.muted { color: var(--muted); font-size: 0.92rem; }
.stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--navy);
}

.table-wrap { overflow-x: auto; }
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.table th, .table td {
    text-align: left;
    padding: 14px 10px;
    border-bottom: 1px solid #ececf0;
    vertical-align: middle;
}

.table th {
    color: var(--muted);
    font-weight: 500;
    font-size: 0.8rem;
}

.file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.file-item {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    border: 1px solid #ececf0;
    border-radius: var(--radius-sm);
    background: #fbfbfd;
    overflow: hidden;
}

.file-item-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
}

.file-item-main {
    flex: 1;
    min-width: 0;
}

.file-item-main strong {
    display: block;
    margin-bottom: 2px;
    overflow-wrap: anywhere;
}

.file-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.file-preview-inline {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #ececf0;
}

.file-preview-inline img {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    background: #f7f7f9;
}

.file-preview-inline-pdf iframe {
    display: block;
    width: 100%;
    height: 480px;
    border: 0;
    background: #f7f7f9;
}

.file-item strong { display: block; margin-bottom: 2px; }

.file-preview-thumb,
.preview-modal {
    display: none !important;
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.comment-item {
    padding: 14px 16px;
    border: 1px solid #ececf0;
    border-radius: var(--radius-sm);
    background: #fbfbfd;
}

.comment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: baseline;
    margin-bottom: 6px;
}

.comment-body {
    margin: 0;
    line-height: 1.5;
    white-space: pre-wrap;
}

.comment-mail-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #ececf0;
    background: #f5f5f7;
    color: var(--navy);
    border-radius: 999px;
    padding: 6px 10px;
    cursor: pointer;
    font: inherit;
}

.comment-mail-btn.is-open,
.comment-mail-btn:hover {
    background: rgba(0, 18, 66, 0.08);
}

.comment-mail-count {
    font-size: 0.82rem;
    font-weight: 600;
}

.comment-row td {
    background: #fafafa;
}

.comment-list-admin {
    max-width: 720px;
}

.toast {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    word-break: break-word;
}

.toast-success {
    background: #eefbf1;
    color: #1b5e31;
    border: 1px solid #ccefd6;
}

.toast-error {
    background: #fff1f2;
    color: #9f1239;
    border: 1px solid #fecdd3;
}

.site-footer {
    margin-top: 40px;
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
}

@media (max-width: 820px) {
    .page { padding: 20px 16px 40px; }
    .page-split { padding: 0; }
    .split-shell { grid-template-columns: 1fr; }
    .split-brand {
        order: -1;
        min-height: 320px;
        border-left: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
        padding: 28px 20px 24px;
    }
    .split-brand-logo { width: min(180px, 46%); }
    .split-brand-title { font-size: 1.9rem; font-weight: 800; }
    .split-brand-center { gap: 16px; margin: 12px 0 20px; }
    .split-brand-footer { padding-top: 8px; }
    .split-main { padding: 20px 16px 40px; }
    .grid-two, .field-row { grid-template-columns: 1fr; }
    .file-item-bar { flex-direction: column; align-items: flex-start; }
    .file-preview-inline-pdf iframe { height: 360px; }
    .brand-name { font-size: 0.95rem; }
}
