*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg:       #0f0f13;
    --surface:  #1a1a24;
    --border:   #2a2a38;
    --text:     #e8e8f0;
    --muted:    #6b6b88;
    --accent:   #ea580c;
    --accent-h: #c2410c;
    --radius:   8px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav-brand { font-size: 1.1rem; font-weight: 600; color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 1rem; }
.nav-links a { color: var(--muted); font-size: 0.9rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: opacity 0.15s;
    text-decoration: none;
}

.btn:hover { opacity: 0.85; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); opacity: 1; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); }
.btn-read { background: transparent; color: var(--accent); border: 1px solid var(--accent); font-size: 0.85rem; }
.btn-full { width: 100%; justify-content: center; }

.alert { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.9rem; }
.alert p { margin: 0; }
.alert-success { background: #14532d30; border: 1px solid #16a34a50; color: #4ade80; }
.alert-error   { background: #7f1d1d30; border: 1px solid #dc262650; color: #f87171; }

.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; width: 100%; max-width: 400px; }
.auth-header { text-align: center; margin-bottom: 1.5rem; }
.auth-header h1 { font-size: 2rem; margin-bottom: 0.3rem; }
.auth-header p  { color: var(--muted); font-size: 0.9rem; }
.auth-footer    { text-align: center; margin-top: 1.25rem; font-size: 0.9rem; color: var(--muted); }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
label { font-size: 0.85rem; color: var(--muted); }

input[type="text"], input[type="password"], textarea, select {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    padding: 0.6rem 0.75rem;
    transition: border-color 0.15s;
    width: 100%;
}

input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; }
select { cursor: pointer; }
.hint { font-size: 0.8rem; color: var(--muted); }
.form-actions { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 0.5rem; }

.page-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.page-header h2 { font-size: 1.4rem; font-weight: 600; margin: 0; }
.badge { background: var(--accent); color: #fff; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; }

.message-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.message-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.message-meta { display: flex; flex-direction: column; gap: 0.2rem; }
.sender { font-size: 0.95rem; }
.expiry { font-size: 0.8rem; color: var(--muted); }

.message-read-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; max-width: 600px; margin: 0 auto; }
.destroy-badge { display: inline-block; background: #7f1d1d30; border: 1px solid #dc262650; color: #f87171; padding: 0.3rem 0.75rem; border-radius: 999px; font-size: 0.8rem; margin-bottom: 0.75rem; }
.message-read-meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem; }
.message-read-content { font-size: 1.05rem; line-height: 1.8; white-space: pre-wrap; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 1.25rem 0; margin-bottom: 1.5rem; }
.message-read-footer { display: flex; justify-content: flex-end; }

.empty-state { text-align: center; padding: 3rem; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 1rem; }

.message-form { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; max-width: 600px; }
h2 { font-size: 1.4rem; font-weight: 600; margin-bottom: 1.5rem; }
