* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0b0b10;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: #eef2ff;
}

.pin-overlay {
    position: fixed;
    inset: 0;
    background: #050508;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.pin-card {
    background: #111116;
    border: 1px solid #2a2a32;
    border-radius: 2rem;
    padding: 2rem;
    width: 320px;
    text-align: center;
    box-shadow: 0 20px 35px -10px black;
}

.pin-card h1 {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pin-input {
    width: 100%;
    background: #1a1a22;
    border: 1px solid #2f2f3a;
    border-radius: 999px;
    padding: 12px 20px;
    margin: 20px 0;
    color: white;
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: 4px;
}

.pin-btn {
    background: #2563eb;
    border: none;
    padding: 10px 20px;
    border-radius: 999px;
    font-weight: bold;
    color: white;
    width: 100%;
    cursor: pointer;
    transition: 0.2s;
}

.pin-btn:hover { background: #3b82f6; }
.pin-error { color: #f87171; margin-top: 12px; font-size: 0.85rem; }

.app { max-width: 1200px; margin: 0 auto; padding: 20px; }
.navbar { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; border-bottom: 1px solid #25252d; flex-wrap: wrap; gap: 12px; }
.logo { font-weight: 700; font-size: 1.5rem; background: linear-gradient(135deg, #94a3f8, #c084fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.user-info { display: flex; gap: 12px; align-items: center; }
.badge { background: #1e1e28; padding: 6px 14px; border-radius: 40px; font-family: monospace; font-size: 0.85rem; }
.icon-btn { background: #1c1c24; border: none; padding: 6px 14px; border-radius: 30px; color: #cbd5e1; cursor: pointer; transition: 0.2s; }
.icon-btn:hover { background: #2d2d38; color: white; }
.btn-primary { background: #2563eb; border: none; padding: 6px 16px; border-radius: 30px; font-weight: 500; color: white; cursor: pointer; transition: 0.2s; }
.btn-primary:hover { background: #3b82f6; }
.btn-secondary { background: #2d2d38; border: none; padding: 6px 16px; border-radius: 30px; color: white; cursor: pointer; }

.tabs { display: flex; gap: 24px; margin: 24px 0 16px; border-bottom: 1px solid #25252d; }
.tab { background: none; border: none; padding: 8px 0; font-size: 1rem; font-weight: 500; color: #94a3b8; cursor: pointer; }
.tab.active { color: #60a5fa; border-bottom: 2px solid #60a5fa; }

.email-list { display: flex; flex-direction: column; gap: 12px; }
.email-card { background: #111116; border: 1px solid #23232b; border-radius: 1rem; padding: 16px; cursor: pointer; transition: 0.1s; border-left: 3px solid transparent; }
.email-card:hover { background: #18181f; border-left-color: #3b82f6; transform: translateX(2px); }
.email-header { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 8px; }
.email-subject { font-weight: 600; margin: 6px 0; }
.email-preview { color: #9ca3af; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loading { text-align: center; padding: 40px; color: #6b7280; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 2000; }
.modal-content { background: #121217; border-radius: 1.5rem; width: 90%; max-width: 500px; padding: 24px; border: 1px solid #2c2c36; }
.modal-content h2 { margin-bottom: 16px; }
.modal-content input, .modal-content textarea { width: 100%; background: #0a0a0e; border: 1px solid #2a2a32; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; color: white; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 10px; }
.status-msg { margin-top: 12px; text-align: center; font-size: 0.85rem; color: #9ca3af; }

.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: #1f2937; color: white; padding: 8px 20px; border-radius: 99px; font-size: 0.85rem; z-index: 3000; box-shadow: 0 4px 12px rgba(0,0,0,0.3); pointer-events: none; }
.hidden { display: none; }