* { box-sizing: border-box; }

:root {
    --ink: #2f3544;
    --ink-soft: #5f6f89;
    --teal: #2aa0a3;
    --teal-dark: #1e8588;
    --teal-soft: #d8f0f1;
    --paper: #ffffff;
    --bg: #eef8fa;
    --line: #e8eef3;
    --shadow: 0 24px 60px rgba(47, 53, 68, 0.12);
    --radius: 24px;
}

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at 0% 8%, rgba(42,160,163,0.16), transparent 34%),
        linear-gradient(115deg, #e8f8f9 0%, #f7fbfc 58%, #f6f8fb 100%);
    color: var(--ink);
    min-height: 100vh;
}

.site-header {
    background: transparent;
    color: var(--ink);
}

.topbar {
    width: 100%;
    background: rgba(255,255,255,0.96);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 30px rgba(47,53,68,0.04);
}

.topbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    color: var(--ink);
    text-decoration: none;
    font-weight: 900;
    line-height: 1;
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
}

.brand-main {
    font-size: 22px;
    letter-spacing: -0.04em;
}

.brand-sub {
    font-size: 13px;
    color: var(--ink-soft);
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-link, .logout {
    color: var(--ink-soft);
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
}

.nav-link.active {
    color: var(--ink);
    position: relative;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 3px;
    border-radius: 999px;
    background: var(--teal);
}

.logout {
    background: var(--teal);
    color: #fff;
    padding: 11px 16px;
    border-radius: 999px;
    box-shadow: 0 10px 25px rgba(42,160,163,0.20);
}

.logout:hover, button:hover, .download:hover { background: var(--teal-dark); }

.hero {
    max-width: 1180px;
    margin: 0 auto;
    min-height: 330px;
    padding: 96px 18px 54px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.8fr);
    gap: 56px;
    align-items: center;
}

.hero-copy { max-width: 650px; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--teal-dark);
    background: var(--teal-soft);
    margin: 0 0 22px;
    font-weight: 900;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 14px;
}

.hero h1 {
    margin: 0 0 24px;
    font-size: clamp(42px, 6vw, 82px);
    line-height: 0.95;
    letter-spacing: -0.07em;
    color: var(--ink);
}

.hero h1 .accent { color: var(--teal); }
.hero p { margin: 0; max-width: 700px; color: var(--ink-soft); font-weight: 650; line-height: 1.8; }

.hero-card {
    background: var(--paper);
    border-radius: 34px;
    padding: 18px;
    transform: rotate(1.5deg);
    box-shadow: var(--shadow);
}

.hero-card-inner {
    min-height: 230px;
    border-radius: 24px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(42,160,163,0.88), rgba(47,53,68,0.95)),
        radial-gradient(circle at 35% 25%, rgba(255,255,255,0.35), transparent 28%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
}

.hero-card-inner strong { font-size: 24px; line-height: 1.15; }
.hero-card-inner span { margin-top: 8px; font-weight: 750; opacity: 0.92; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 22px 18px 70px;
}

.panel {
    background: rgba(255,255,255,0.74);
    border: 1px solid rgba(232,238,243,0.9);
    border-radius: 30px;
    padding: 24px;
    box-shadow: 0 16px 50px rgba(47,53,68,0.06);
}

.breadcrumbs { margin-bottom: 20px; color: var(--ink-soft); font-weight: 750; }
.breadcrumbs a, .back-link { color: var(--teal-dark); text-decoration: none; font-weight: 900; }
.breadcrumbs a:hover, .back-link:hover { text-decoration: underline; }

h2 { margin: 32px 0 18px; font-size: 28px; letter-spacing: -0.03em; }

.folder-grid, .photo-grid { display: grid; gap: 18px; }
.folder-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.photo-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.folder-card, .photo-card, .empty, .login-card {
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: 0 14px 35px rgba(47,53,68,0.09);
    border: 1px solid var(--line);
}

.folder-card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 22px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 900;
    transition: transform .16s ease, box-shadow .16s ease;
}

.folder-card:hover { transform: translateY(-3px); box-shadow: 0 18px 45px rgba(42,160,163,0.16); }
.folder-icon { font-size: 30px; }
.photo-card { overflow: hidden; }
.photo-card img { width: 100%; height: 205px; object-fit: cover; display: block; background: #eaf1f4; }
.download {
    display: block;
    padding: 14px;
    text-align: center;
    text-decoration: none;
    color: white;
    background: var(--teal);
    font-weight: 900;
}

.empty { padding: 26px; color: var(--ink-soft); }
.site-footer { text-align: center; padding: 34px; color: var(--ink-soft); font-weight: 700; }

.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 0% 8%, rgba(42,160,163,0.16), transparent 34%),
        linear-gradient(115deg, #e8f8f9 0%, #f7fbfc 58%, #f6f8fb 100%);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(100%, 470px);
    padding: 38px;
    box-shadow: var(--shadow);
}

.brand-mark {
    display: inline-flex;
    flex-direction: column;
    line-height: 1;
    margin-bottom: 24px;
}

.brand-mark strong { font-size: 24px; letter-spacing: -0.04em; }
.brand-mark span { font-size: 13px; color: var(--ink-soft); font-weight: 800; }

.login-card h1 { margin: 0 0 12px; font-size: 36px; letter-spacing: -0.05em; line-height: 1; }
.login-card h1 .accent { color: var(--teal); }
.muted, .small-note { color: var(--ink-soft); line-height: 1.65; }
.small-note { font-size: 13px; margin-bottom: 0; }
.error { background: #fff1f2; color: #9f1239; padding: 12px; border-radius: 14px; font-weight: 800; }

label { display: block; margin: 22px 0 8px; font-weight: 900; }
input {
    width: 100%;
    padding: 15px;
    border: 1px solid #dbe4ea;
    border-radius: 15px;
    font-size: 16px;
    color: var(--ink);
}
input:focus { outline: 3px solid rgba(42,160,163,0.18); border-color: var(--teal); }
button {
    width: 100%;
    margin-top: 14px;
    padding: 15px;
    border: 0;
    border-radius: 15px;
    background: var(--teal);
    color: white;
    font-size: 16px;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(42,160,163,0.20);
}

@media (max-width: 820px) {
    .hero { grid-template-columns: 1fr; padding-top: 54px; gap: 28px; }
    .hero-card { transform: none; }
    .header-actions { gap: 12px; }
    .nav-link { display: none; }
}

@media (max-width: 520px) {
    .hero h1 { font-size: 48px; }
    .topbar-inner { padding: 14px; }
    .brand-main { font-size: 18px; }
    .logout { padding: 10px 13px; }
    .panel, .login-card { padding: 20px; }
}
