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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.5;
}

/* Header */
header {
    background: #2c3e50;
    color: #fff;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
header h1 { font-size: 1.2rem; font-weight: 600; }
header .back-link,
header .logout-link { color: rgba(255,255,255,0.8); text-decoration: none; font-size: 0.9rem; }
header .back-link:hover,
header .logout-link:hover { color: #fff; }

/* Flash messages */
.flash {
    padding: 10px 20px;
    font-size: 0.9rem;
}
.flash.error { background: #e74c3c; color: #fff; }
.flash.success { background: #27ae60; color: #fff; }

/* Login */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #2c3e50;
}
.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    width: 100%;
    max-width: 360px;
    text-align: center;
}
.login-box h1 { color: #2c3e50; margin-bottom: 4px; }
.login-box .subtitle { color: #7f8c8d; margin-bottom: 24px; font-size: 0.9rem; }
.login-box input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 12px;
}
.login-box button {
    width: 100%;
    padding: 12px;
    background: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}
.login-box button:hover { background: #34495e; }

/* Main content */
main { padding: 20px; max-width: 800px; margin: 0 auto; }

/* Draft list */
.draft-list { display: flex; flex-direction: column; gap: 12px; }
.draft-card {
    display: block;
    background: #fff;
    border-radius: 6px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    border-left: 4px solid #e67e22;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s;
}
.draft-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.draft-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 4px;
}
.draft-subject { font-weight: 600; margin-bottom: 4px; }
.draft-preview { font-size: 0.9rem; color: #555; }
.draft-attachments { font-size: 0.8rem; color: #e67e22; margin-top: 4px; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 1.1rem;
}

/* Email detail */
.email-detail { background: #fff; border-radius: 6px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.email-header { border-bottom: 1px solid #eee; padding-bottom: 12px; margin-bottom: 16px; }
.email-field { margin-bottom: 4px; font-size: 0.95rem; }
.email-body { margin-bottom: 16px; }
.email-body pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    background: #fafafa;
    padding: 16px;
    border-radius: 4px;
    border: 1px solid #eee;
}
.email-attachments { margin-bottom: 16px; }
.email-attachments ul { list-style: none; margin-top: 8px; }
.email-attachments li { margin-bottom: 4px; }
.email-attachments a { color: #2980b9; }

/* Comment section */
.comment-section {
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}
.comment-section label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
}
.comment-section textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
}
.comment-section textarea:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 0 2px rgba(44,62,80,0.15);
}

/* Action buttons */
.actions { display: flex; gap: 12px; padding-top: 16px; border-top: 1px solid #eee; }
.inline-form { display: inline; }
.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
}
.btn-send { background: #27ae60; color: #fff; }
.btn-send:hover { background: #219a52; }
.btn-reject { background: #e74c3c; color: #fff; }
.btn-reject:hover { background: #c0392b; }

/* Mobile */
@media (max-width: 600px) {
    main { padding: 12px; }
    .login-box { margin: 20px; padding: 24px; }
    .actions { flex-direction: column; }
    .btn { width: 100%; text-align: center; }
}
