/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
    --bg-body: #111115;
    --bg-surface: #19191f;
    --bg-elevated: #222229;
    --bg-input: #16161c;

    --accent: #f97316;
    --accent-hover: #ea580c;
    --accent-dim: rgba(249, 115, 22, 0.10);
    --accent-glow: rgba(249, 115, 22, 0.25);

    --red: #ef4444;
    --red-dim: rgba(239, 68, 68, 0.10);

    --amber: #f59e0b;
    --amber-dim: rgba(245, 158, 11, 0.10);

    --text-primary: #ededef;
    --text-secondary: #8b8b96;
    --text-muted: #55555f;

    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.10);

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400;
}

/* ============================================
   SHELL (CONTENT WRAPPER)
   ============================================ */
.shell {
    max-width: 880px;
    margin: 0 auto;
    padding: clamp(1.5rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2rem);
}

/* ============================================
   HEADER
   ============================================ */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.header__brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.header__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--bg-body);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.header__name {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.header__tagline {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

/* ============================================
   TAB NAVIGATION
   ============================================ */
.tab-nav {
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.tab-nav__track {
    display: inline-flex;
    position: relative;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 4px;
    gap: 2px;
}

.tab-nav__indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    width: calc(50% - 5px);
    background: var(--bg-elevated);
    border-radius: calc(var(--radius-lg) - 2px);
    transition: transform 0.4s var(--ease-out-expo);
    z-index: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.tab-nav__indicator.at-1 {
    transform: translateX(calc(100% + 2px));
}

.tab-btn {
    position: relative;
    z-index: 1;
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: calc(var(--radius-lg) - 2px);
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s var(--ease-out);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
}

.tab-btn i {
    font-size: 0.75rem;
    transition: transform 0.3s var(--ease-out);
}

.tab-btn:hover {
    color: var(--text-secondary);
}

.tab-btn--active {
    color: var(--text-primary);
}

.tab-btn--active i {
    color: var(--accent);
}

/* ============================================
   TAB PANELS
   ============================================ */
.tab-panel {
    display: none;
    width: 100%;
}

.tab-panel--active {
    display: block;
}

/* ============================================
   REVEAL ANIMATION
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    animation: revealUp 0.6s var(--ease-out-expo) forwards;
}

.reveal[data-delay="0"] { animation-delay: 0ms; }
.reveal[data-delay="1"] { animation-delay: 80ms; }
.reveal[data-delay="2"] { animation-delay: 160ms; }
.reveal[data-delay="3"] { animation-delay: 260ms; }
.reveal[data-delay="4"] { animation-delay: 340ms; }
.reveal[data-delay="5"] { animation-delay: 420ms; }

@keyframes revealUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        animation: none;
    }
    .tab-nav__indicator { transition: none; }
}

/* ============================================
   NEW REQUEST LAYOUT
   ============================================ */
.new-request {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: clamp(1.25rem, 3vw, 2rem);
    align-items: start;
}

.request-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-label {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
    display: block;
}

.select-wrap {
    position: relative;
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: transform 0.25s var(--ease-out), color 0.25s;
}

.select-wrap:focus-within .select-arrow {
    color: var(--accent);
    transform: translateY(-50%) rotate(180deg);
}

.form-select,
.form-input {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 500;
    outline: none;
    transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.form-select:focus,
.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-select {
    cursor: pointer;
    appearance: none;
    padding-right: 2.5rem;
}

.form-select option {
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    padding: 0.5rem;
}

.form-select--inline {
    padding: 0.4rem 2rem 0.4rem 0.6rem;
    font-size: 0.78rem;
    width: auto;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
}

.form-input--search {
    padding: 0.5rem 0.75rem 0.5rem 2.2rem;
    font-size: 0.82rem;
    border-radius: var(--radius);
    width: 180px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: all 0.2s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.btn--submit {
    background: var(--accent);
    color: var(--bg-body);
    width: 100%;
    padding: 0.9rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: var(--radius);
}

.btn--submit:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn--submit:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
    box-shadow: none;
}

.btn--submit:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.btn__text,
.btn__loader {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    transition: opacity 0.2s, transform 0.2s;
}

.btn__loader {
    display: none;
}

.btn--loading .btn__text { display: none; }
.btn--loading .btn__loader { display: flex; }

.btn--nav {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 0.45rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 500;
}

.btn--nav:hover:not(:disabled) {
    border-color: var(--border-strong);
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.btn--nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ============================================
   INFO PANEL
   ============================================ */
.info-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.3s;
}

.info-panel.has-content {
    border-color: var(--accent-dim);
}

.info-panel__header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.info-panel__icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 0.82rem;
}

.info-panel__title {
    font-size: 0.88rem;
    font-weight: 700;
    flex: 1;
    color: var(--text-primary);
}

.info-panel__dismiss {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.15s;
}

.info-panel__dismiss:hover {
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

.info-panel__body {
    padding: 1.25rem;
    min-height: 120px;
}

.info-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100px;
    gap: 0.3rem;
}

.info-empty__greeting {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.info-empty__hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    max-width: 240px;
    line-height: 1.5;
}

.info-panel__body h4 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.info-panel__body p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.info-panel__body .bonus-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.info-panel__body .bonus-details li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0.35rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
}

.info-panel__body .bonus-details li i {
    color: var(--accent);
    font-size: 0.62rem;
}

/* ============================================
   REQUESTS HEADER (Taleplerim)
   ============================================ */
.requests-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.requests-header__title {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.requests-header__stats {
    display: flex;
    gap: 0.5rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    background: var(--bg-surface);
    border: 1px solid var(--border);
}

.stat__count {
    font-size: 0.88rem;
    font-weight: 700;
}

.stat__label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
}

.stat--pending .stat__count { color: var(--amber); }
.stat--approved .stat__count { color: var(--accent); }
.stat--rejected .stat__count { color: var(--red); }

/* ============================================
   TABLE CONTROLS
   ============================================ */
.table-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
}

.per-page {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
}

.search-field {
    position: relative;
}

.search-field__icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.72rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.2s;
}

.search-field:focus-within .search-field__icon {
    color: var(--accent);
}

/* ============================================
   DATA TABLE
   ============================================ */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-surface);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 0.8rem 1rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-size: 0.84rem;
}

.data-table tbody tr {
    transition: background 0.15s;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table__empty td {
    text-align: center;
    padding: 0;
    border-bottom: none;
}

.empty-state {
    padding: 3rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 1.8rem;
    opacity: 0.3;
}

.empty-state p {
    font-size: 0.84rem;
    font-weight: 500;
}

/* Status pills */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.status--pending {
    background: var(--amber-dim);
    color: var(--amber);
}

.status--approved {
    background: var(--accent-dim);
    color: var(--accent);
}

.status--rejected {
    background: var(--red-dim);
    color: var(--red);
}

.status i {
    font-size: 0.4rem;
}

/* ============================================
   TABLE FOOTER
   ============================================ */
.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
}

.table-footer__info {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.table-footer__nav {
    display: flex;
    gap: 0.4rem;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius);
    font-size: 0.84rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    animation: toastIn 0.4s var(--ease-out-expo);
}

.toast--out {
    animation: toastOut 0.3s var(--ease-out) forwards;
}

.toast--success {
    background: var(--accent);
    color: var(--bg-body);
}

.toast--error {
    background: var(--red);
    color: #fff;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .new-request {
        grid-template-columns: 1fr;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .requests-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-input--search {
        width: 100%;
    }

    .table-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .tab-nav__track {
        width: 100%;
    }

    .tab-btn {
        flex: 1;
        justify-content: center;
    }

    .tab-nav__indicator {
        width: calc(50% - 5px);
    }

    .requests-header__stats {
        width: 100%;
    }

    .stat {
        flex: 1;
        justify-content: center;
    }
}
