/* ============================================================
   MÜRACİƏT SİSTEMİ — Warm Bordeaux · Glassmorphism
   Poppins + Pacifico · yumşaq şərab tonları
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Pacifico&display=swap&subset=latin,latin-ext');

:root {
    --bg:            #1a0d10;   /* isti tünd, qara deyil */
    --bg-2:          #241015;
    --bg-3:          #2e1419;

    --surface:       rgba(255,255,255,0.06);
    --surface-2:     rgba(255,255,255,0.09);
    --surface-3:     rgba(216,112,128,0.12);
    --border:        rgba(255,255,255,0.12);
    --border-bright: rgba(232,140,155,0.5);

    --text:          #fbeef0;
    --text-dim:      #d3aeb4;
    --text-faint:    #9c7176;

    /* Yumşaq, isti şərab palitra */
    --wine:      #a83048;   /* yumşaq bordo */
    --wine-br:   #d54ب62;
    --wine-br:   #d54b62;   /* parlaq, isti qırmızı-çəhrayı */
    --wine-lt:   #ef7d92;   /* açıq çəhrayı-qırmızı */
    --blood:     #7d203a;   /* dərin amma isti */
    --gold:      #e0b15e;   /* isti qızıl aksent */

    /* Status rəngləri */
    --st-gray:   #9aa0a6;
    --st-yellow: #f2c14e;
    --st-orange: #ef8e4a;
    --st-green:  #5fc27e;
    --st-red:    #e7574f;

    --radius:    18px;
    --radius-sm: 12px;
    --radius-pill: 999px;
    --font-display: 'Poppins', sans-serif;
    --font-body:    'Poppins', sans-serif;
    --font-script:  'Pacifico', cursive;
    --shadow: 0 24px 70px -26px rgba(0,0,0,0.7);
}

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

html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    position: relative;
    overflow-x: hidden;
}

/* ---------- FON: isti glow + yumşaq ləkələr ---------- */
.aurora {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(60vw 50vw at 85% -5%, rgba(213,75,98,0.32), transparent 60%),
        radial-gradient(55vw 55vw at 10% 105%, rgba(168,48,72,0.40), transparent 62%),
        radial-gradient(40vw 40vw at 50% 50%, rgba(224,177,94,0.06), transparent 60%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
/* incə grain */
body::after {
    content: ''; position: fixed; inset: 0; z-index: 1; pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap {
    position: relative; z-index: 2;
    max-width: 600px; margin: 0 auto;
    padding: 70px 20px 30px;
    display: flex; justify-content: center;
}

/* ---------- KART (glassmorphism) ---------- */
.card {
    width: 100%;
    background: rgba(255,255,255,0.055);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 44px 40px;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.08);
    position: relative;
    overflow: hidden;
    animation: rise .55s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes rise { from{opacity:0; transform:translateY(18px)} to{opacity:1; transform:translateY(0)} }

.card-logo {
    display: block; height: 56px; width: auto;
    max-width: 70%; margin: 0 0 24px;
    object-fit: contain;
}

/* ---------- BAŞLIQ ---------- */
.greeting {
    font-family: var(--font-display);
    font-weight: 700; font-size: 34px;
    line-height: 1.08; letter-spacing: -0.01em;
    color: var(--text-dim);
    margin-bottom: 10px;
}
.greeting b {
    color: var(--text); font-weight: 700;
    background: linear-gradient(110deg, var(--wine-lt), var(--wine-br));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.subtitle {
    font-size: 14.5px; color: var(--text-dim);
    line-height: 1.55; margin-bottom: 28px; max-width: 92%;
    font-weight: 300;
}

.brand { position: fixed; top: 22px; left: 24px; z-index: 5; }
.brand img { height: 34px; width: auto; display: block; }

/* ---------- SAHƏLƏR ---------- */
.field { margin-bottom: 18px; }
.field label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--text-dim); margin-bottom: 8px;
    letter-spacing: 0.01em;
}
.field label .req { color: var(--wine-lt); }

input, select, textarea {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    transition: .18s;
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--border-bright);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 0 3px rgba(213,75,98,0.16);
}
textarea { resize: vertical; line-height: 1.6; }
select {
    appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23d3aeb4' stroke-width='2'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center;
}
select option { background: #241015; color: var(--text); }
.row { display: flex; gap: 14px; }
.row .field { flex: 1; }
.hint-text { font-size: 12px; color: var(--text-faint); margin-top: 6px; }

/* ---------- DÜYMƏLƏR ---------- */
.btn-row { display: flex; gap: 12px; }
.btn {
    flex: 1; text-align: center;
    padding: 15px 22px; border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 15px; font-weight: 600;
    cursor: pointer; transition: .2s;
}
.btn-primary {
    background: linear-gradient(135deg, var(--wine-br), var(--wine));
    color: #fff;
    box-shadow: 0 8px 26px -8px rgba(213,75,98,0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -8px rgba(213,75,98,0.7); }
.btn-primary:disabled { opacity: .55; cursor: default; transform: none; }
.btn-ghost {
    background: rgba(255,255,255,0.06); color: var(--text-dim);
    border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-bright); }

/* ---------- ALERT ---------- */
.alert {
    background: rgba(231,87,79,0.12);
    border: 1px solid rgba(231,87,79,0.38);
    color: #f6a39d;
    padding: 12px 16px; border-radius: var(--radius-sm);
    font-size: 14px; margin-bottom: 18px; display: none;
}
.alert.show { display: block; }

/* ---------- KATEQORİYA GRID ---------- */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.cat-opt {
    text-align: left; padding: 18px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.05);
    cursor: pointer; transition: .2s;
    font-weight: 600; font-size: 14.5px;
    position: relative; overflow: hidden;
}
.cat-opt:hover { border-color: var(--border-bright); background: rgba(255,255,255,0.09); transform: translateY(-2px); }
.cat-opt.selected {
    border-color: var(--wine-br);
    background: var(--surface-3);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(213,75,98,0.25) inset;
}
.cat-opt .emoji { font-size: 26px; display: block; margin-bottom: 10px; }

/* ---------- TOGGLE ---------- */
.toggle-group { display: flex; gap: 12px; }
.toggle-opt {
    flex: 1; text-align: center; padding: 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.05);
    cursor: pointer; transition: .2s;
    font-weight: 600; font-size: 15px;
}
.toggle-opt:hover { border-color: var(--border-bright); }
.toggle-opt.selected {
    border-color: var(--wine-br); background: var(--surface-3);
    box-shadow: 0 0 0 2px rgba(213,75,98,0.25) inset; color: #fff;
}
.toggle-opt .emoji { font-size: 24px; display: block; margin-bottom: 6px; }

/* ---------- INFO QUTU ---------- */
.info-box {
    background: var(--surface-3);
    border: 1px solid rgba(213,75,98,0.25);
    border-radius: var(--radius-sm);
    padding: 16px; font-size: 13.5px;
    color: var(--text-dim); line-height: 1.6; margin-bottom: 20px;
}
.info-box b { color: var(--text); }

/* ---------- UĞUR ---------- */
.success-icon {
    width: 72px; height: 72px; margin: 0 auto 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--wine-br), var(--blood));
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 34px -8px rgba(213,75,98,0.6);
}
.success-icon svg { width: 36px; height: 36px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* müraciət nömrəsi qutusu — kopyalana bilən */
.ref-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px; text-align: center;
    margin: 24px 0; position: relative; overflow: hidden;
    cursor: pointer; transition: .2s;
}
.ref-box:hover { border-color: var(--border-bright); background: rgba(255,255,255,0.08); }
.ref-box:active { transform: scale(0.985); }
.ref-box::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(60% 100% at 50% 0%, rgba(213,75,98,0.16), transparent);
}
.ref-label {
    font-size: 11px; font-weight: 600;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--text-dim); margin-bottom: 12px; position: relative;
}
.ref-code {
    font-family: var(--font-display); font-size: 30px; font-weight: 700;
    letter-spacing: 0.04em; position: relative;
    background: linear-gradient(110deg, var(--wine-lt), var(--gold));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ref-hint { font-size: 12.5px; color: var(--text-faint); margin-top: 12px; position: relative; }
.ref-hint .copy-tag { color: var(--wine-lt); font-weight: 600; }

/* kopyalama bildirişi (toast) */
.toast {
    position: fixed; left: 50%; bottom: 32px;
    transform: translateX(-50%) translateY(20px);
    background: rgba(40,18,23,0.96);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-bright);
    color: var(--text);
    padding: 14px 24px; border-radius: var(--radius-pill);
    font-size: 14px; font-weight: 500;
    box-shadow: 0 14px 40px -10px rgba(0,0,0,0.6);
    opacity: 0; pointer-events: none; z-index: 100;
    transition: .3s cubic-bezier(.2,.8,.2,1);
    display: flex; align-items: center; gap: 8px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- İZLƏMƏ NƏTİCƏSİ ---------- */
.track-result {
    margin-top: 24px; text-align: left;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px;
}
.track-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.track-ref { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--text); }
.track-cat { font-size: 12.5px; color: var(--text-dim); margin-top: 4px; }
.track-title { font-weight: 600; font-size: 17px; color: var(--text); margin-bottom: 8px; }
.track-msg { font-size: 14px; color: var(--text-dim); line-height: 1.6; margin-bottom: 10px; font-weight: 300; }
.track-date { font-size: 12px; color: var(--text-faint); }

/* ---------- STATUS NİŞANLARI (rəngli) ---------- */
.status-badge {
    display: inline-block; white-space: nowrap;
    padding: 6px 14px; border-radius: var(--radius-pill);
    font-size: 12px; font-weight: 600;
}
.st-new      { background: rgba(154,160,166,0.18); color: #c2c7cc; }
.st-progress { background: rgba(242,193,78,0.16);  color: var(--st-yellow); }
.st-forward  { background: rgba(239,142,74,0.16);  color: var(--st-orange); }
.st-done     { background: rgba(95,194,126,0.16);  color: var(--st-green); }
.st-closed   { background: rgba(231,87,79,0.16);   color: var(--st-red); }

/* ---------- ZAMAN XƏTTİ (rəngli nöqtələr) ---------- */
.timeline { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 20px; }
.tl-title {
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--text-dim); margin-bottom: 16px;
}
.tl-item { display: flex; gap: 14px; position: relative; padding-bottom: 20px; }
.tl-item:not(:last-child)::before {
    content: ''; position: absolute; left: 6px; top: 16px; bottom: 0;
    width: 2px; background: var(--border);
}
.tl-dot {
    width: 14px; height: 14px; border-radius: 50%;
    flex-shrink: 0; margin-top: 3px;
    background: var(--st-gray);
}
/* status-a görə nöqtə rəngi */
.tl-dot.d-new      { background: var(--st-gray);   box-shadow: 0 0 0 3px rgba(154,160,166,0.2); }
.tl-dot.d-progress { background: var(--st-yellow); box-shadow: 0 0 0 3px rgba(242,193,78,0.22); }
.tl-dot.d-forward  { background: var(--st-orange); box-shadow: 0 0 0 3px rgba(239,142,74,0.22); }
.tl-dot.d-done     { background: var(--st-green);  box-shadow: 0 0 0 3px rgba(95,194,126,0.22); }
.tl-dot.d-closed   { background: var(--st-red);    box-shadow: 0 0 0 3px rgba(231,87,79,0.22); }
.tl-body { flex: 1; }
.tl-status { font-weight: 600; font-size: 14.5px; color: var(--text); }
.tl-comment {
    font-size: 13.5px; color: var(--text-dim); line-height: 1.55;
    margin-top: 6px; background: rgba(255,255,255,0.05);
    border-left: 2px solid var(--wine); border-radius: 8px; padding: 10px 12px;
}
.tl-date { font-size: 11.5px; color: var(--text-faint); margin-top: 6px; }

/* ---------- İCTİMAİ LENT ---------- */
.feed-stats {
    display: flex; justify-content: space-around; gap: 12px;
    margin: 24px 0; padding: 22px;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.05); border: 1px solid var(--border);
}
.fs-item { text-align: center; }
.fs-num { font-family: var(--font-display); font-size: 34px; font-weight: 800; color: var(--text); }
.fs-lbl { font-size: 11px; color: var(--text-dim); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.feed-list { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.feed-item { background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; border-left: 3px solid var(--st-green); }
.feed-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.feed-title { font-weight: 600; font-size: 15px; color: var(--text); }
.feed-date { font-size: 12px; color: var(--text-faint); margin-top: 5px; }
.req-cat-tag { font-size: 11px; color: var(--text-dim); background: rgba(255,255,255,0.06); padding: 3px 10px; border-radius: var(--radius-pill); }

/* ---------- FOOTER ---------- */
.site-footer { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 20px 44px; text-align: center; }
.site-footer img { height: 28px; width: auto; opacity: 0.8; }
.site-footer .copy-text { color: var(--text-faint); font-size: 12px; letter-spacing: 0.01em; }

.hidden { display: none !important; }

@media (max-width: 480px) {
    .card { padding: 32px 22px; }
    .greeting { font-size: 28px; }
    .cat-grid { grid-template-columns: 1fr; }
    .row { flex-direction: column; gap: 0; }
    .brand img { height: 28px; }
    .card-logo { height: 46px; }
}
