/* style.css — Shared styles for auth pages */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500&family=DM+Serif+Display&display=swap');

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

:root {
    --bg:          #f5f4f1;
    --surface:     #ffffff;
    --border:      rgba(0,0,0,0.1);
    --text:        #1a1a1a;
    --text-muted:  #6b6b6b;
    --text-hint:   #999;
    --accent:      #1a1a1a;
    --radius:      10px;
    --error-bg:    #fef2f2;
    --error-text:  #991b1b;
    --success-bg:  #f0fdf4;
    --success-text:#166534;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 15px;
}

/* ── Auth pages (login / register) ── */

.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 380px;
}

.brand { margin-bottom: 2rem; }

.brand-mark {
    width: 34px;
    height: 34px;
    background: var(--accent);
    border-radius: 8px;
    margin-bottom: 1.25rem;
}

.brand h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 4px;
}

.brand p {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 300;
}

/* ── Alerts ── */

.alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.alert-error   { background: var(--error-bg);   color: var(--error-text); }
.alert-success { background: var(--success-bg);  color: var(--success-text); }
.alert-success a { color: var(--success-text); font-weight: 500; }

/* ── Form fields ── */

.field { margin-bottom: 1rem; }

.field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.field label .hint {
    font-weight: 300;
    color: var(--text-hint);
}

.field input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    background: #fafafa;
    border: 0.5px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

.field input:focus {
    border-color: rgba(0,0,0,0.35);
    background: #fff;
}

.field input::placeholder { color: var(--text-hint); }

/* ── Buttons ── */

.btn-primary {
    width: 100%;
    height: 40px;
    margin-top: 0.5rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
}

.btn-primary:hover  { opacity: 0.85; }
.btn-primary:active { transform: scale(0.98); }

/* ── Switch link ── */

.switch-link {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 1.5rem;
}

.switch-link a {
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
}

.switch-link a:hover { text-decoration: underline; }

/* ── Dashboard ── */

.dashboard-wrap {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 3rem 1rem;
}

.dashboard-card {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    width: 100%;
    max-width: 560px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.dashboard-header > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-mark.small {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    margin-bottom: 0;
}

.dashboard-header h1 {
    font-size: 16px;
    font-weight: 500;
}

.btn-logout {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    border: 0.5px solid var(--border);
    border-radius: 8px;
    padding: 6px 14px;
    transition: background 0.15s;
}

.btn-logout:hover { background: #f5f4f1; }

.welcome-box {
    background: #fafafa;
    border: 0.5px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.welcome-label {
    font-size: 12px;
    color: var(--text-hint);
    margin-bottom: 4px;
}

.welcome-email {
    font-size: 15px;
    font-weight: 500;
}

.dashboard-note {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.dashboard-note code {
    font-family: monospace;
    background: #f0ede8;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

/* ── Profile pages ── */

.page-wrap {
    min-height: 100vh;
    background: var(--bg);
}

/* Top nav */
.topnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 56px;
    background: var(--surface);
    border-bottom: 0.5px solid var(--border);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
}

.nav-links a:hover { color: var(--text); }

/* Edit profile layout */
.profile-edit-wrap {
    max-width: 580px;
    margin: 2.5rem auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* View profile layout */
.profile-view-wrap {
    max-width: 580px;
    margin: 2.5rem auto;
    padding: 0 1rem;
}

/* Card */
.card {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem 2rem;
}

.card h2 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 0.5px solid var(--border);
}

/* Avatar */
.avatar-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.avatar-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 0.5px solid var(--border);
    flex-shrink: 0;
}

.avatar-img.large {
    width: 80px;
    height: 80px;
}

.avatar-initials {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e8e6e0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 500;
    flex-shrink: 0;
}

.avatar-initials.large {
    width: 80px;
    height: 80px;
    font-size: 26px;
}

/* File upload */
.file-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    border: 0.5px solid var(--border);
    border-radius: 8px;
    padding: 6px 14px;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 6px;
}

.file-label:hover { background: #f5f4f1; }

.file-input {
    display: none;
}

.field-hint {
    font-size: 12px;
    color: var(--text-hint);
    margin-top: 4px;
}

/* Two column field row */
.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .field-row { grid-template-columns: 1fr; }
}

/* Disabled input */
input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: #f5f4f1;
}

/* Profile view */
.profile-card { }

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.profile-meta { flex: 1; }

.profile-meta h1 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 4px;
}

.member-since {
    font-size: 13px;
    color: var(--text-muted);
}

.btn-outline {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    border: 0.5px solid var(--border);
    border-radius: 8px;
    padding: 6px 14px;
    transition: background 0.15s;
    white-space: nowrap;
}

.btn-outline:hover { background: #f5f4f1; color: var(--text); }

/* ── Nav avatar ── */
.avatar-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.15s;
}

.avatar-nav-link:hover { background: #f5f4f1; }

.nav-avatar {
    width: 32px !important;
    height: 32px !important;
    font-size: 13px !important;
}

/* ── Landing page ── */
.landing-wrap {
    max-width: 700px;
    margin: 5rem auto;
    padding: 0 1rem;
    text-align: center;
}

.landing-hero h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 36px;
    font-weight: 400;
    margin-bottom: 0.75rem;
}

.landing-hero p {
    font-size: 16px;
    color: var(--text-muted);
}

/* ── Nav DM badge ── */
.nav-dm-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.nav-badge {
    background: #1a1a1a;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    border-radius: 10px;
    padding: 1px 6px;
    min-width: 18px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.6;
}

/* ── Users list ── */
.users-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    border: 0.5px solid var(--border);
    background: var(--surface);
    gap: 1rem;
}

.user-row-left {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    flex: 1;
    min-width: 0;
}

.user-row-left:hover .user-name { text-decoration: underline; }

.user-name  { font-size: 14px; font-weight: 500; }
.user-email { font-size: 12px; color: var(--text-muted); }

