* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f4f5f7;
    color: #1a1a1a;
    margin: 0;
}
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #202a3c;
    color: #fff;
    padding: 14px 24px;
}
header h1 { font-size: 18px; margin: 0; }
header a.logout { color: #cbd3e0; text-decoration: none; font-size: 14px; }

main { max-width: 900px; margin: 24px auto; padding: 0 16px; }
.panel {
    background: #fff;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.panel h2 { margin-top: 0; font-size: 16px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #eee; }
th { color: #666; font-weight: 600; }

form { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
input, select {
    padding: 8px 10px;
    border: 1px solid #d5d9e0;
    border-radius: 6px;
    font-size: 14px;
}
input[name="body"] { flex: 1; min-width: 200px; }
button {
    background: #2d6cdf;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
button:hover { background: #2158bd; }

.hidden { display: none; }
#new-key-output {
    background: #fff8e1;
    border: 1px solid #f0d98c;
    padding: 10px;
    border-radius: 6px;
    font-family: monospace;
    word-break: break-all;
}

.status-received, .status-delivered { color: #1a7f37; }
.status-sent { color: #2d6cdf; }
.status-pending, .status-sending { color: #9a6b00; }
.status-failed { color: #c62828; }

/* login page */
body.login-page {
    display: flex; align-items: center; justify-content: center; height: 100vh;
}
.login-box {
    background: #fff; padding: 32px; border-radius: 8px; width: 280px;
    display: flex; flex-direction: column; gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.login-box label { display: flex; flex-direction: column; font-size: 13px; gap: 4px; }
.login-box .error { color: #c62828; font-size: 13px; }
