:root{
    --bg: #f7fbff;
    --bg-soft: #f2f7fb;
    --bg-header: rgba(255, 255, 255, .82);
    --surface: rgba(255, 255, 255, .94);
    --surface-strong: #ffffff;
    --surface-soft: #f8fafc;
    --surface-muted: #eef4f8;

    --border: rgba(15, 23, 42, .08);
    --border-strong: rgba(15, 23, 42, .12);
    --text: #0f172a;
    --muted: #475569;
    --muted-soft: #64748b;

    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: #eff6ff;
    --secondary: #edf2f7;
    --secondary-text: #0f172a;

    --success-bg: rgba(34, 197, 94, .12);
    --warning-bg: rgba(245, 158, 11, .14);
    --error-bg: rgba(239, 68, 68, .12);
    --info-bg: rgba(59, 130, 246, .12);

    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-2xl: 28px;

    --shadow-soft:
        0 10px 24px rgba(15, 23, 42, .05),
        0 3px 8px rgba(15, 23, 42, .03);

    --shadow-card:
        0 18px 40px rgba(15, 23, 42, .06),
        0 4px 12px rgba(15, 23, 42, .03);

    --shadow-header:
        0 10px 30px rgba(15, 23, 42, .05);

    --container: 1600px;
}

*{
    box-sizing: border-box;
}

html, body{
    margin:0;
    padding:0;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, .05), transparent 18%),
        radial-gradient(circle at top right, rgba(37, 99, 235, .05), transparent 20%),
        linear-gradient(180deg, #f7fbff 0%, #f4f8fc 100%);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

img{
    display:block;
    max-width:100%;
}

a{
    color: var(--primary);
    text-decoration: none;
    transition: color .16s ease, opacity .16s ease, transform .16s ease;
}

a:hover{
    color: var(--primary-hover);
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6{
    color: var(--text);
    line-height: 1.12;
    letter-spacing: -.02em;
}

p{
    color: inherit;
}

.container{
    max-width: var(--container);
    margin: auto;
    padding: 0 1rem;
    width: 100%;
}

main{
    flex: 1;
    padding: 2rem 0 2.6rem 0;
}

header{
    position: sticky;
    top: 0;
    z-index: 60;
    margin-bottom: 1rem;
    backdrop-filter: blur(14px);
    background: var(--bg-header);
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    box-shadow: var(--shadow-header);
}

header::before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:
        linear-gradient(90deg, rgba(16, 185, 129, .04), transparent 25%, transparent 75%, rgba(37, 99, 235, .04));
}

header .container{
    position: relative;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding: .9rem 0;
    gap: 1rem;
    flex-wrap: nowrap;
}

.brand{
    display:inline-flex;
    align-items:center;
    gap:.72rem;
    color: var(--text);
    font-weight: 800;
    font-size: 1.02rem;
    letter-spacing: -.01em;
    min-width: 0;
    flex: 1 1 auto;
}

.brand:hover{
    color: var(--text);
}

.brand-mark{
    width: 42px;
    height: 42px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius: 14px;
    background:
        linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%);
    border: 1px solid rgba(37, 99, 235, .10);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.7),
        0 8px 18px rgba(15, 23, 42, .05);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.brand-text{
    display:flex;
    flex-direction:column;
    gap:.08rem;
    line-height:1.05;
    min-width: 0;
}

.brand-name{
    color: var(--text);
}

.brand-sub{
    color: var(--muted-soft);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .01em;
}

.nav-wrap{
    position: relative;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    flex: 0 0 auto;
}

.nav-toggle{
    display:none;
    width:44px;
    height:44px;
    padding:0;
    border-radius:14px;
    border:1px solid rgba(15, 23, 42, .08);
    background: rgba(255,255,255,.9);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
    cursor:pointer;
    align-items:center;
    justify-content:center;
    color: var(--text);
    flex-shrink: 0;
}

.nav-toggle:hover{
    background:#ffffff;
}

.nav-toggle-lines{
    display:grid;
    gap:4px;
}

.nav-toggle-lines span{
    display:block;
    width:18px;
    height:2px;
    border-radius:999px;
    background: var(--text);
    transition: transform .18s ease, opacity .18s ease;
}

.nav-toggle.is-active .nav-toggle-lines span:nth-child(1){
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle-lines span:nth-child(2){
    opacity: 0;
}

.nav-toggle.is-active .nav-toggle-lines span:nth-child(3){
    transform: translateY(-6px) rotate(-45deg);
}

nav{
    display:flex;
    gap: .55rem;
    flex-wrap: wrap;
    align-items:center;
}

nav a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height: 40px;
    padding: .58rem .88rem;
    border-radius: 999px;
    color: var(--text);
    font-size: .93rem;
    font-weight: 700;
    background: rgba(255,255,255,.74);
    border: 1px solid rgba(15, 23, 42, .07);
    box-shadow: 0 6px 14px rgba(15, 23, 42, .03);
}

nav a:hover{
    color: var(--primary-hover);
    border-color: rgba(37, 99, 235, .14);
    background: #ffffff;
    transform: translateY(-1px);
}

footer{
    margin-top: 1rem;
    border-top: 1px solid rgba(15, 23, 42, .06);
    background:
        linear-gradient(180deg, rgba(255,255,255,.82) 0%, rgba(248,250,252,.96) 100%);
    backdrop-filter: blur(10px);
    margin: 1rem;;
}

footer .container{
    padding: 1.35rem 0 1.5rem 0;
    display:grid;
    gap:.75rem;
}

.footer-top{
    display:flex;
    justify-content:space-between;
    gap:1rem;
    flex-wrap:wrap;
    align-items:center;
}

.footer-links{
    display:flex;
    gap:.6rem;
    flex-wrap:wrap;
}

.footer-links a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:.5rem .8rem;
    border-radius:999px;
    border:1px solid rgba(15, 23, 42, .07);
    background: rgba(255,255,255,.85);
    color: var(--text);
    font-size: .9rem;
    font-weight: 700;
}

.footer-links a:hover{
    color: var(--primary-hover);
    border-color: rgba(37, 99, 235, .14);
    background: #ffffff;
}

.footer-note{
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.6;
}

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:.45rem;
    min-height: 44px;
    padding:.74rem 1rem;
    border-radius:14px;
    border:1px solid var(--border);
    background: var(--surface-soft);
    color: var(--secondary-text);
    font-size:.94rem;
    font-weight:700;
    text-decoration:none;
    cursor:pointer;
    box-shadow: var(--shadow-soft);
    transition:
        transform .16s ease,
        box-shadow .16s ease,
        background .16s ease,
        border-color .16s ease,
        color .16s ease,
        opacity .16s ease;
}

.btn:hover{
    text-decoration:none;
    transform: translateY(-1px);
}

.btn:disabled{
    opacity:.72;
    cursor:not-allowed;
    transform:none;
}

.btn-primary{
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border-color: rgba(37, 99, 235, .25);
    box-shadow:
        0 14px 28px rgba(37, 99, 235, .20),
        0 4px 10px rgba(15, 23, 42, .05);
}

.btn-primary:hover{
    background: linear-gradient(180deg, #2b6cf0 0%, #1e46c6 100%);
    color: white;
    border-color: rgba(37, 99, 235, .35);
}

.btn-secondary{
    background: rgba(255,255,255,.92);
    color: var(--secondary-text);
    border-color: rgba(15, 23, 42, .08);
}

.btn-secondary:hover{
    background: #ffffff;
    color: var(--text);
    border-color: rgba(15, 23, 42, .12);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="search"],
input[type="tel"],
textarea,
select{
    width: 100%;
    padding: 0.8rem 0.9rem;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, .12);
    background: rgba(255,255,255,.96);
    color: var(--text);
    font: inherit;
    outline: none;
    box-shadow:
        inset 0 1px 2px rgba(15, 23, 42, .02),
        0 4px 12px rgba(15, 23, 42, .02);
    transition:
        border-color .16s ease,
        box-shadow .16s ease,
        background .16s ease;
}

input:focus,
textarea:focus,
select:focus{
    border-color: rgba(37, 99, 235, .36);
    box-shadow:
        0 0 0 4px rgba(37, 99, 235, .10),
        0 10px 18px rgba(15, 23, 42, .04);
    background: #ffffff;
}

textarea{
    resize: vertical;
    min-height: 110px;
}

label{
    display: inline-block;
    margin-bottom: .4rem;
    font-weight: 700;
    color: var(--text);
}

.card{
    background:
        linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(251,253,255,1) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.section-soft{
    padding: 1rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(248,250,252,1) 100%);
    box-shadow: var(--shadow-card);
}

.muted{
    color: var(--muted);
}

.text-soft{
    color: var(--muted-soft);
}

.flash-wrap{
    display:grid;
    gap:.75rem;
    margin-bottom:1rem;
}

.flash-message{
    padding:.95rem 1rem;
    border-radius:16px;
    border:1px solid rgba(15, 23, 42, .08);
    box-shadow: var(--shadow-soft);
    font-weight: 600;
}

.flash-success{
    background: var(--success-bg);
}

.flash-error{
    background: var(--error-bg);
}

.flash-warning{
    background: var(--warning-bg);
}

.flash-info{
    background: var(--info-bg);
}

.panel-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:1rem;
    flex-wrap:wrap;
}

.pill{
    display:inline-flex;
    align-items:center;
    gap:.35rem;
    padding:.42rem .68rem;
    border-radius:999px;
    background: var(--surface-soft);
    border:1px solid var(--border);
    color:#334155;
    font-size:.84rem;
    font-weight:700;
}

.identity-chip{
    display:flex;
    align-items:center;
    gap:.8rem;
    min-width:0;
}

.identity-chip--large{
    padding:1rem 1.1rem;
    border-radius:20px;
    background:#f8fafc;
    border:1px solid rgba(15, 23, 42, .08);
}

.identity-avatar{
    width:42px;
    height:42px;
    flex:0 0 42px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    background:linear-gradient(135deg, #dbeafe 0%, #dcfce7 100%);
    border:1px solid rgba(37, 99, 235, .14);
    color:#0f172a;
    font-weight:800;
    font-size:1rem;
    overflow:hidden;
}

.identity-avatar--image{
    object-fit:cover;
    background:#e2e8f0;
}

.identity-meta{
    min-width:0;
    display:grid;
    gap:.12rem;
}

.identity-handle{
    display:block;
    color:var(--text);
    font-size:.97rem;
    line-height:1.25;
}

@media (max-width: 860px){
    .footer-top{
        align-items:flex-start;
    }
}

@media (max-width: 720px){
    main{
        padding: 1.2rem 0 1.8rem 0;
    }

    header .container{
        align-items:center;
    }

    .brand{
        flex: 1 1 auto;
        min-width: 0;
        padding-right: .5rem;
    }

    .brand-mark{
        width: 38px;
        height: 38px;
        border-radius: 12px;
        font-size: 1rem;
    }

    .brand-sub{
        font-size: .72rem;
    }

    .nav-toggle{
        display:inline-flex;
    }

    .nav-wrap{
        position: static;
        flex: 0 0 auto;
    }

    nav{
        position: absolute;
        left: 1rem;
        right: 1rem;
        top: calc(100% + .55rem);
        display:none;
        flex-direction: column;
        align-items: stretch;
        gap: .55rem;
        padding: .8rem;
        border-radius: 18px;
        background: rgba(255,255,255,.96);
        border: 1px solid rgba(15, 23, 42, .07);
        box-shadow: 0 16px 30px rgba(15, 23, 42, .10);
        z-index: 80;
    }

    nav.is-open{
        display:flex;
    }

    nav a{
        width: 100%;
        justify-content: flex-start;
        font-size: .92rem;
        padding: .82rem .9rem;
        border-radius: 14px;
        background: #ffffff;
    }

    footer .container{
        padding: 1.1rem 0 1.25rem 0;
    }
}

@media (max-width: 520px){
    .container{
        padding: 0 .9rem;
    }

    .btn{
        width: 100%;
    }

    .footer-links{
        width: 100%;
    }

    .footer-links a{
        flex: 1 1 auto;
    }
}


.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #334155; /* slate-700 */
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.username {
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
}

.user-date {
  font-size: 12px;
  color: #6b7280;
}