:root {
    --bg: #f3efe4;
    --card: #fffaf0;
    --ink: #1f1f1f;
    --muted: #6b665d;
    --primary: #d1495b;
    --primary-dark: #8c2f39;
    --line: #e6dcc8;
    --ok: #1f7a4d;
    --err: #b42318;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 10%, #f9d8a9 0%, transparent 35%),
        radial-gradient(circle at 90% 85%, #ffd3cf 0%, transparent 35%),
        var(--bg);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.bg-shape {
    position: fixed;
    width: 320px;
    height: 320px;
    border-radius: 48% 52% 63% 37% / 48% 30% 70% 52%;
    opacity: .22;
    filter: blur(12px);
    z-index: -1;
    animation: float 12s ease-in-out infinite;
}

.bg-shape-a {
    top: -70px;
    right: -60px;
    background: #ff9f80;
}

.bg-shape-b {
    bottom: -70px;
    left: -60px;
    background: #f3c969;
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-16px) rotate(6deg); }
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.hero {
    margin-bottom: 18px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    letter-spacing: -0.02em;
}

.hero p {
    margin: 8px 0 0;
    color: var(--muted);
}

.card {
    background: linear-gradient(180deg, #fffaf0 0%, #fff6e8 100%);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(49, 39, 24, 0.08);
}

.day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.day-header h2,
.day-header h3 {
    margin: 0;
}

.day-header span {
    color: var(--muted);
    font-size: .92rem;
}

.pdf-list {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
}

.pdf-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.65);
}

.pdf-list li + li {
    margin-top: 8px;
}

a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
}

a:hover {
    text-decoration: underline;
}

small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.filter-form,
.stack-form,
.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.stack-form {
    flex-direction: column;
    align-items: flex-start;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="file"],
button,
.link-btn {
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit;
    padding: 9px 12px;
    background: #fff;
}

button,
.link-btn {
    cursor: pointer;
    background: var(--primary);
    color: #fff;
    border-color: transparent;
    font-weight: 700;
}

button:hover,
.link-btn:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

.link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.danger-link,
.delete-btn {
    background: #3f3f3f;
}

.danger-link:hover,
.delete-btn:hover {
    background: #161616;
}

.alert {
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1px solid;
}

.alert.success {
    color: var(--ok);
    border-color: rgba(31, 122, 77, 0.4);
    background: rgba(31, 122, 77, 0.08);
}

.alert.error {
    color: var(--err);
    border-color: rgba(180, 35, 24, 0.4);
    background: rgba(180, 35, 24, 0.08);
}

.empty-state {
    text-align: center;
}

@media (max-width: 700px) {
    .pdf-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-form,
    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }

    button,
    .link-btn,
    input[type="text"],
    input[type="password"],
    input[type="date"],
    input[type="file"] {
        width: 100%;
    }
}
