/* shaola — 白基調モノクロ・モダン */
:root {
    --bg: #ffffff;
    --fg: #111111;
    --muted: #6b6b6b;
    --line: #e3e3e3;
    --line-strong: #111111;
    --surface: #fafafa;
    --accent: #111111;
    --danger: #8a1f1f;
    --radius: 10px;
    --maxw: 880px;
    font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- header / footer ---- */
.site-header {
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo { display: inline-flex; align-items: center; }
.nav { display: flex; align-items: center; gap: 20px; font-size: .9rem; }
.nav a { color: var(--fg); text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.nav-user { color: var(--muted); }
.nav-logout { color: var(--muted) !important; }

.site-footer {
    margin-top: 64px;
    padding: 24px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

main.container { padding-top: 40px; padding-bottom: 40px; }

/* ---- typography ---- */
h1 { font-size: 1.6rem; font-weight: 700; margin: 0 0 .5rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; font-weight: 700; margin: 2rem 0 .75rem; }
p.lead { color: var(--muted); margin-top: 0; }
a { color: var(--fg); }

/* ---- card ---- */
.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    background: var(--bg);
}
.card + .card { margin-top: 20px; }
.narrow { max-width: 440px; margin: 40px auto; }

/* ---- forms ---- */
.field { margin-bottom: 18px; }
label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--fg);
    background: var(--bg);
    font-family: inherit;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--line-strong);
}
textarea { min-height: 110px; resize: vertical; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 5px; }

/* ---- buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .15s;
}
.btn:hover { opacity: .85; }
.btn-block { width: 100%; }
.btn-outline { background: #fff; color: var(--fg); }
.btn-sm { padding: 6px 12px; font-size: .82rem; }
.btn-danger { background: #fff; color: var(--danger); border-color: var(--danger); }

/* ---- flash ---- */
.flash {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: .9rem;
    border: 1px solid var(--line);
}
.flash-success { background: var(--surface); border-color: var(--line-strong); }
.flash-error { background: #fff; border-color: var(--danger); color: var(--danger); }

/* ---- tables ---- */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
tr:last-child td { border-bottom: none; }

/* ---- badges ---- */
.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    border: 1px solid var(--line-strong);
}
.badge-active { background: var(--fg); color: #fff; }
.badge-muted { background: #fff; color: var(--muted); border-color: var(--line); }

/* ---- file list ---- */
.file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.file-row:last-child { border-bottom: none; }
.file-meta { color: var(--muted); font-size: .82rem; }

/* ---- credentials box (送信完了) ---- */
.cred {
    background: var(--surface);
    border: 1px dashed var(--line-strong);
    border-radius: 8px;
    padding: 16px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    word-break: break-all;
}

/* ---- utils ---- */
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 200px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 20px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

@media (max-width: 560px) {
    .nav { gap: 12px; font-size: .8rem; }
    .card { padding: 20px; }
}

/* ---- minimal layout (home / login) ---- */
.body-minimal {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* home */
.home-wrap { text-align: center; }
.home-logo { display: inline-block; margin-bottom: 22px; text-decoration: none; }
.home-logo img { display: block; }
.home-tagline { font-size: .75rem; color: #aaa; letter-spacing: .14em; margin: 0; }

/* login */
.login-wrap { width: 100%; max-width: 360px; }
.login-logo { display: block; text-align: center; margin-bottom: 68px; }
.login-logo img { width: 220px; height: auto; }

/* horizontal label + underline input */
.field-h {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 32px;
}
.field-h label {
    flex-shrink: 0;
    width: 72px;
    text-align: right;
    font-size: .75rem;
    font-weight: 400;
    color: #888;
    letter-spacing: .04em;
    padding-bottom: 9px;
    line-height: 1;
}
/* 詳細度 (0,2,1) でグローバルの input[type=*] (0,1,1) を上書き */
.field-h input[type="email"],
.field-h input[type="password"],
.field-h input[type="text"] {
    flex: 1;
    border: none;
    border-bottom: 1px solid #ccc;
    border-radius: 0;
    padding: 4px 0 9px;
    background: transparent;
    font-size: .9rem;
    color: #222;
    font-family: inherit;
    width: auto;
    box-shadow: none;
}
.field-h input[type="email"]:focus,
.field-h input[type="password"]:focus,
.field-h input[type="text"]:focus {
    outline: none;
    border-color: transparent;
    border-bottom-color: #888;
}

/* auth button (centered, rounded, outlined) */
.btn-auth-wrap {
    display: flex;
    justify-content: center;
    margin-top: 56px;
}
.btn-auth {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 52px;
    background: #fff;
    color: #444;
    border: 1px solid #bbb;
    border-radius: 24px;
    font-size: .85rem;
    font-weight: 400;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: .08em;
    transition: background .15s, border-color .15s;
    text-decoration: none;
}
.btn-auth:hover { background: #f6f6f6; border-color: #999; color: #333; }
.btn-auth:disabled { opacity: .4; cursor: not-allowed; }

/* ---- public layout (download pages) ---- */
.pub-header { padding: 40px 0 0; text-align: center; }
.pub-header a { display: inline-block; }
.pub-header img { display: block; width: 150px; height: auto; }
.pub-main { padding-top: 56px; padding-bottom: 72px; }
.pub-footer { padding: 16px 0 32px; text-align: center; font-size: .72rem; color: #bbb; }
.pub-inner { max-width: 440px; margin: 0 auto; }
.pub-inner-wide { max-width: 600px; }
.pub-heading { font-size: .95rem; font-weight: 500; margin: 0 0 8px; letter-spacing: .01em; color: #444; }
.pub-sub { font-size: .8rem; color: #bbb; letter-spacing: .04em; margin: 0 0 36px; }
