/* N.O.T.R.N — themed after N.O.T.P.F.S */

@font-face {
    font-family: 'CustomFont';
    src: url('fonts/BOXIGEN.ttf') format('truetype');
}

* {
    box-sizing: border-box;
}

a:link    { color: #22c55e; }
a:visited { color: green; }
a:hover   { color: #16a34a; }
a:active  { color: #16a34a; }

body {
    margin: 0;
    padding: 0;
    font-family: 'CustomFont', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #111111;
    color: #e0e0e0;
}

.page {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px 32px;
}

/* Header */

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

.header-main h1 {
    margin: 0;
    font-size: 2.4rem;
    letter-spacing: 0.05em;
}

.subtitle {
    margin: 4px 0 0;
    color: #aaaaaa;
    font-size: 0.95rem;
}

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

.user-pill {
    font-size: 0.85rem;
    color: #cbd5f5;
    background: #181818;
    border: 1px solid #262626;
    border-radius: 999px;
    padding: 4px 10px;
}

/* Flash messages */

.flash-container { margin-bottom: 16px; }

.flash {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.flash-success {
    background-color: #14341f;
    border: 1px solid #22c55e33;
    color: #a7f3d0;
}

.flash-error {
    background-color: #3a1010;
    border: 1px solid #f9737333;
    color: #fecaca;
}

/* Cards */

.card {
    background-color: #181818;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 18px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
    border: 1px solid #262626;
}

.card h2 { margin: 0 0 12px; font-size: 1.4rem; }

/* Inputs */

input[type="text"],
input[type="password"],
input[type="search"],
textarea {
    background: #101010;
    border-radius: 8px;
    border: 1px solid #333333;
    padding: 8px 10px;
    color: #e0e0e0;
    font-family: inherit;
    font-size: 0.95rem;
    width: 100%;
}

input::placeholder,
textarea::placeholder { color: #6b7280; }

input:focus,
textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #1d4ed833;
}

/* Buttons (pills, like the drive) */

.btn {
    border-radius: 999px;
    border: none;
    padding: 8px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    background: #27272a;
    color: #e4e4e7;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: inherit;
}

.btn.small { padding: 4px 10px; font-size: 0.75rem; }

.btn.primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #022c22;
}

.btn.secondary { background: #111827; border: 1px solid #374151; }
.btn.ghost     { background: transparent; border: 1px solid #3f3f46; }
.btn.danger    { background: #7f1d1d; color: #fecaca; }
.btn:disabled  { opacity: 0.5; cursor: default; }

/* Badges */

.badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.badge-admin { background: #fbbf2433; color: #facc15; }

/* Login form */

.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: #aaaaaa; }
.muted { color: #9ca3af; font-size: 0.85rem; }

/* ===== Chat ===== */

.chat-card {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    min-height: 360px;
    padding: 0;
    overflow: hidden;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid #262626;
    font-size: 0.85rem;
    color: #9ca3af;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #6b7280;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
}

.status-dot.online {
    background: #22c55e;
    box-shadow: 0 0 8px #22c55eaa;
}

.status-dot.offline { background: #ef4444; }

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.msg {
    max-width: 78%;
    padding: 8px 12px;
    border-radius: 14px;
    background: #1f2933;
    border: 1px solid #262626;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.msg .msg-user {
    display: block;
    font-size: 0.72rem;
    color: #22c55e;
    margin-bottom: 2px;
    letter-spacing: 0.03em;
}

.msg .msg-text { font-size: 0.95rem; color: #e5e7eb; white-space: pre-wrap; }
.msg .msg-time { display: block; font-size: 0.65rem; color: #6b7280; margin-top: 3px; text-align: right; }

.msg.mine {
    align-self: flex-end;
    background: linear-gradient(135deg, #14532d, #166534);
    border-color: #22c55e55;
}

.msg.mine .msg-user { color: #a7f3d0; }

.msg.system {
    align-self: center;
    max-width: 90%;
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 0.78rem;
    text-align: center;
    padding: 2px 0;
}

.composer {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #262626;
    background: #151515;
}

.composer textarea {
    resize: none;
    min-height: 42px;
    max-height: 120px;
    flex: 1;
}

.composer .btn { align-self: stretch; }
