:root {
    --bg: #09111b;
    --bg-2: #0d1624;
    --panel: rgba(12, 20, 33, 0.82);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text: #eef4ff;
    --muted: #9eb0cb;
    --primary: #2ca4ff;
    --primary-2: #6c63ff;
    --success: #3ddb8f;
    --danger: #ff7a7a;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background:
        radial-gradient(900px 480px at 10% 5%, rgba(44, 164, 255, 0.22), transparent 55%),
        radial-gradient(900px 520px at 90% 10%, rgba(108, 99, 255, 0.20), transparent 55%),
        radial-gradient(860px 520px at 50% 100%, rgba(61, 219, 143, 0.10), transparent 55%),
        linear-gradient(180deg, var(--bg), var(--bg-2));
}

img {
    max-width: 100%;
    display: block;
}

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

.auth-body {
    min-height: 100vh;
}

.auth-shell,
.page-shell {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.glass {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.auth-card,
.card,
.hero {
    border-radius: var(--radius);
}

.auth-card {
    width: min(100%, 520px);
    padding: 28px;
}

.auth-brand h1,
.hero h1,
.card-head h2,
.empty-state h3 {
    margin: 0;
}

.auth-brand p,
.hero p,
.card-head p,
.auth-footnote,
.empty-state p {
    color: var(--muted);
}

.auth-brand {
    margin-bottom: 24px;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.08);
    color: #d9ecff;
    margin-bottom: 14px;
}

.auth-form,
.upload-form,
.switch-form {
    display: grid;
    gap: 14px;
}

label,
.file-picker {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

input[type="text"],
input[type="password"],
select,
input[type="file"] {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(0, 0, 0, 0.18);
    color: var(--text);
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 16px;
}

input[type="file"] {
    padding: 12px;
}

small {
    color: var(--muted);
}

.btn {
    border: 0;
    border-radius: 16px;
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    transition: transform 0.12s ease, opacity 0.12s ease, background 0.12s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.btn-secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-block {
    width: 100%;
}

.notice {
    border-radius: 16px;
    padding: 14px 16px;
    margin: 0 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.notice-ok {
    background: rgba(61, 219, 143, 0.12);
}

.notice-error {
    background: rgba(255, 122, 122, 0.12);
}

.hero {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

.chip {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: #dcebff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 18px;
}

.sidebar,
.content-area {
    display: grid;
    gap: 18px;
    align-content: start;
}

.card {
    padding: 20px;
}

.sticky-card {
    position: sticky;
    top: 24px;
}

.card-head {
    margin-bottom: 18px;
}

.card-head-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.section-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.section-actions form {
    margin: 0;
}

.day-list {
    display: grid;
    gap: 12px;
}

.day-card {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.day-card.is-active {
    border-color: rgba(44, 164, 255, 0.50);
    box-shadow: inset 0 0 0 1px rgba(44, 164, 255, 0.15);
}

.day-card-main {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.day-card-text {
    display: grid;
    gap: 4px;
}

.day-card-text strong {
    font-size: 18px;
}

.day-card-text span,
.photo-meta span {
    color: var(--muted);
    font-size: 14px;
}

.day-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.day-card-actions form {
    margin: 0;
}

.empty-state {
    padding: 28px 10px 10px;
    text-align: center;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
    align-items: start;
}

.photo-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.photo-thumb-wrap {
    display: block;
    aspect-ratio: 3 / 4;
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.photo-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-meta {
    padding: 12px;
    display: grid;
    gap: 4px;
}

.photo-meta strong {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-footnote {
    margin-top: 14px;
    font-size: 13px;
}

.upload-selection {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 14px;
}

.upload-progress {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.upload-progress[hidden] {
    display: none !important;
}

.upload-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.progress-track {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}

.progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--primary), var(--success));
    transition: width 0.2s ease;
}

.upload-progress-text {
    font-size: 14px;
    color: var(--muted);
}

.btn-danger {
    color: white;
    background: linear-gradient(135deg, #ff6b6b, #d9485f);
}

.btn-small {
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 12px;
}

.photo-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 12px 12px;
}

.photo-actions form {
    margin: 0;
}

.photo-actions .btn,
.photo-actions form .btn {
    width: 100%;
}

@media (max-width: 1080px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .sticky-card {
        position: static;
    }
}

@media (max-width: 720px) {
    .auth-shell,
    .page-shell {
        padding: 16px;
    }

    .hero,
    .card,
    .auth-card {
        padding: 18px;
        border-radius: 22px;
    }

    .hero {
        flex-direction: column;
    }

    .hero-actions {
        justify-content: flex-start;
    }

    .day-card-main,
    .card-head-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .day-card-actions,
    .section-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .photo-actions {
        grid-template-columns: 1fr;
    }
}
