:root {
    --bg: #f6f7f9;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --accent: #111827;
    --accent-soft: #f3f4f6;
    --danger: #b91c1c;
    --radius: 18px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.container {
    width: min(760px, calc(100% - 28px));
    margin: 0 auto;
    padding: 24px 0 48px;
}

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

h1 {
    font-size: clamp(26px, 5vw, 42px);
    margin: 0;
    letter-spacing: -0.04em;
}

h2 {
    font-size: 20px;
    margin: 0 0 12px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.04);
    margin-bottom: 16px;
}

.login-card {
    margin-top: 12vh;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

@media (max-width: 560px) {
    .form-row { grid-template-columns: 1fr; }
    .header { align-items: flex-start; flex-direction: column; }
}

input, select, button, .button {
    width: 100%;
    border-radius: 13px;
    border: 1px solid var(--line);
    font-size: 16px;
    padding: 12px 14px;
    background: white;
    color: var(--text);
}

button, .button {
    cursor: pointer;
    border: 0;
    background: var(--accent);
    color: white;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.button.secondary, button.secondary {
    background: var(--accent-soft);
    color: var(--text);
}

.button.danger, button.danger {
    background: #fee2e2;
    color: var(--danger);
}

.userbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    color: var(--muted);
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tabs a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--text);
    text-decoration: none;
    background: var(--accent-soft);
    font-weight: 700;
}

.tabs a.active {
    background: var(--accent);
    color: white;
}

.item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    border-top: 1px solid var(--line);
    padding: 14px 0;
}

.item:first-child { border-top: 0; }

.item-name {
    font-size: 18px;
    font-weight: 750;
    word-break: break-word;
}

.meta {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
    line-height: 1.35;
}

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

.empty {
    padding: 22px 0 4px;
    color: var(--muted);
    text-align: center;
}

.notice {
    padding: 12px 14px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    color: #9a3412;
    margin-bottom: 14px;
}

.small {
    font-size: 13px;
    color: var(--muted);
}
