/* ============================================================
   ADMIN CONTROL — FANCY STYLES
   ============================================================ */

/* ---------- Wrapper (90% of screen) ---------- */
.admin-wrapper {
    width: 90%;
    max-width: 1700px;
    margin: 0 auto;
    padding: 2rem 1rem 6rem;
}

.fade-in { animation: fadeIn 0.5s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Hero header ---------- */
.admin-hero {
    position: relative;
    text-align: center;
    padding: 3rem 2rem 2.5rem;
    background: linear-gradient(135deg, #1e2a3a 0%, #2b3a67 55%, #3f4f7f 100%);
    border-radius: 26px;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(30, 42, 58, 0.18);
    margin-bottom: 2rem;
}

.admin-hero-glow {
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 161, 30, 0.28) 0%, transparent 70%);
    pointer-events: none;
}

.admin-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.10);
    border: 2px solid rgba(212, 161, 30, 0.7);
    color: #d4a11e;
    font-size: 1.9rem;
    margin-bottom: 0.9rem;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(6px);
}

.admin-hero-title {
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: -0.02em;
    margin: 0;
    position: relative;
    z-index: 1;
}

.admin-hero-subtitle {
    color: rgba(255, 255, 255, 0.82);
    margin: 0.4rem 0 1.2rem;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}
.admin-hero-subtitle strong { color: #d4a11e; }

.admin-hero-stats {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.admin-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 0.4rem 0.9rem;
    border-radius: 40px;
    font-size: 0.83rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}
.admin-stat-pill i { color: #d4a11e; }

/* ---------- Alerts ---------- */
.alert-modern {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.9rem 1.2rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    font-weight: 500;
    animation: slideDown 0.35s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.alert-modern-success {
    background: #e6f7ec;
    color: #186b3d;
    border-left: 4px solid #2ecc71;
}
.alert-modern-success i { color: #2ecc71; font-size: 1.1rem; }

.alert-modern-info {
    background: #eaf1fb;
    color: #1f3f72;
    border-left: 4px solid #3b82f6;
}
.alert-modern-info i { color: #3b82f6; font-size: 1.1rem; }

/* ---------- Fancy Accordion (always full width) ---------- */
.fancy-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.fancy-item {
    width: 100%;
    border: none;
    background: #fff;
    border-radius: 22px !important;
    box-shadow: 0 8px 26px rgba(30, 42, 58, 0.08);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.2s ease;
}
.fancy-item:hover {
    box-shadow: 0 14px 36px rgba(30, 42, 58, 0.12);
    transform: translateY(-2px);
}

/* Force inner collapse + body to stretch full width */
.fancy-item .accordion-collapse,
.fancy-item .accordion-body,
.fancy-item .fancy-collapse,
.fancy-item .fancy-body {
    width: 100%;
}

/* ---------- Accordion Button ---------- */
.fancy-button {
    background: #fff !important;
    border: none !important;
    padding: 1.1rem 1.25rem !important;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-radius: 22px !important;
    box-shadow: none !important;
    transition: background 0.15s;
}
.fancy-button:hover { background: #fbfcfe !important; }
.fancy-button:not(.collapsed) { background: #fbfcfe !important; }
.fancy-button:focus { box-shadow: none !important; outline: none; }
.fancy-button::after { display: none !important; }

/* ---------- Icon tile ---------- */
.fancy-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    color: #fff;
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.fancy-button:hover .fancy-icon { transform: scale(1.06) rotate(-3deg); }

.fancy-icon-gold   { background: linear-gradient(135deg, #f0b41d, #d4a11e); box-shadow: 0 8px 20px rgba(212,161,30,0.35); }
.fancy-icon-blue   { background: linear-gradient(135deg, #3b82f6, #2563eb); box-shadow: 0 8px 20px rgba(37,99,235,0.32); }
.fancy-icon-purple { background: linear-gradient(135deg, #a855f7, #7e22ce); box-shadow: 0 8px 20px rgba(126,34,206,0.32); }

/* ---------- Title block ---------- */
.fancy-title {
    display: flex;
    flex-direction: column;
    text-align: left;
    flex-grow: 1;
}
.fancy-title-main {
    font-weight: 700;
    font-size: 1.02rem;
    color: #1e2a3a;
    letter-spacing: -0.01em;
}
.fancy-title-sub {
    font-size: 0.78rem;
    color: #8890a0;
    font-weight: 400;
    margin-top: 1px;
}

/* ---------- Badge ---------- */
.fancy-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.32rem 0.65rem;
    border-radius: 40px;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}
.fancy-badge-gold   { background: rgba(212,161,30,0.15);  color: #a77d16; }
.fancy-badge-blue   { background: rgba(59,130,246,0.14);  color: #2563eb; }
.fancy-badge-purple { background: rgba(168,85,247,0.14);  color: #7e22ce; }

/* ---------- Arrow ---------- */
.fancy-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f0f2f5;
    color: #6b7280;
    font-size: 0.95rem;
    transition: transform 0.3s ease, background 0.2s;
    flex-shrink: 0;
}
.fancy-button:not(.collapsed) .fancy-arrow {
    transform: rotate(180deg);
    background: #1e2a3a;
    color: #fff;
}

/* ---------- Collapse Body ---------- */
.fancy-collapse { border-top: 1px solid #eef1f6; }

.fancy-body {
    padding: 2rem 2.5rem !important;
    background: #fbfcfe;
}

/* ---------- Section heading inside body ---------- */
.fancy-section-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #2b3a67;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px dashed #dbe0ea;
}
.fancy-section-head i { color: #d4a11e; font-size: 1rem; }

/* ---------- Form inputs ---------- */
.fancy-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 0.35rem;
    letter-spacing: 0.01em;
}
.fancy-label i { color: #d4a11e; margin-right: 2px; }

.fancy-input-wrap { position: relative; }

.fancy-input-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #b0b7c3;
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.15s;
    z-index: 2;
}

.fancy-input {
    width: 100%;
    padding: 0.72rem 0.9rem 0.72rem 2.6rem;
    border: 1.5px solid #e5e8ee;
    border-radius: 13px;
    background: #fff;
    font-size: 0.92rem;
    color: #1e2a3a;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
}
.fancy-input::placeholder { color: #b0b7c3; }
.fancy-input:focus {
    outline: none;
    border-color: #d4a11e;
    box-shadow: 0 0 0 0.22rem rgba(212, 161, 30, 0.15);
}
.fancy-input-wrap:focus-within .fancy-input-icon { color: #d4a11e; }

.fancy-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 2.4rem;
}

.fancy-eye {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #8890a0;
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    z-index: 3;
    transition: color 0.15s, background 0.15s;
}
.fancy-eye:hover { color: #1e2a3a; background: rgba(212,161,30,0.12); }

/* ---------- Buttons ---------- */
.btn-fancy-primary,
.btn-fancy-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.78rem 1.4rem;
    border: none;
    border-radius: 13px;
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    transition: transform 0.12s, box-shadow 0.15s, background 0.15s;
    cursor: pointer;
}

.btn-fancy-primary {
    background: linear-gradient(135deg, #1e2a3a 0%, #2b3a67 100%);
    box-shadow: 0 8px 22px rgba(30, 42, 58, 0.22);
}
.btn-fancy-primary:hover {
    background: linear-gradient(135deg, #0e1a2b 0%, #1e2a3a 100%);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(30, 42, 58, 0.3);
    color: #fff;
}

.btn-fancy-success {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 8px 22px rgba(22, 163, 74, 0.28);
}
.btn-fancy-success:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(22, 163, 74, 0.35);
    color: #fff;
}

/* ---------- Table ---------- */
.fancy-table-wrap {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #eef1f6;
}

.fancy-table {
    margin: 0 !important;
    background: #fff;
}
.fancy-table thead th {
    background: #f5f7fb;
    color: #4b5563;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.85rem 1rem;
    border: none;
    white-space: nowrap;
}
.fancy-table tbody td {
    padding: 0.85rem 1rem;
    border-top: 1px solid #f0f2f6;
    vertical-align: middle;
    font-size: 0.9rem;
}
.fancy-table tbody tr:hover td { background: #fbfcfe; }
.fancy-table tbody tr.edit-row:hover td { background: transparent; }

/* ---------- User cell with avatar ---------- */
.fancy-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.fancy-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2b3a67, #1e2a3a);
    color: #d4a11e;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    border: 2px solid #e5e8ee;
}

/* ---------- ID pill ---------- */
.fancy-id {
    display: inline-block;
    background: #f0f2f5;
    color: #4b5563;
    padding: 0.2rem 0.55rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.78rem;
}

/* ---------- Chips ---------- */
.fancy-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.3rem 0.7rem;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.fancy-chip i { font-size: 0.72rem; }

.fancy-chip-admin    { background: rgba(212, 161, 30, 0.15);  color: #a77d16; }
.fancy-chip-user     { background: rgba(100, 116, 139, 0.14); color: #475569; }
.fancy-chip-active   { background: rgba(22, 163, 74, 0.14);   color: #15803d; }
.fancy-chip-inactive { background: rgba(220, 38, 38, 0.13);   color: #b91c1c; }
.fancy-chip-you      { background: #f0f2f5; color: #8890a0; font-style: italic; }

/* ---------- Icon buttons ---------- */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: none;
    background: #f0f2f5;
    color: #4b5563;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, transform 0.12s;
    margin-right: 4px;
}
.btn-icon:hover { transform: translateY(-1px); }
.btn-icon-edit:hover   { background: #eaf1fb; color: #2563eb; }
.btn-icon-delete:hover { background: #fdecec; color: #dc2626; }

/* ---------- Inline edit panel ---------- */
.fancy-edit-panel {
    background: linear-gradient(180deg, #f8faff 0%, #f4f7fc 100%);
    padding: 1.4rem 1.4rem 1.2rem;
    margin: 0.4rem 1rem 1rem;
    border-radius: 16px;
    border: 1px dashed #dbe0ea;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .admin-wrapper {
        width: 95%;
        padding: 1.5rem 0.75rem 6rem;
    }
}

@media (max-width: 576px) {
    .admin-wrapper    { width: 96%; padding: 1rem 0.5rem 6rem; }
    .admin-hero       { padding: 2rem 1rem 1.5rem; border-radius: 20px; }
    .admin-hero-title { font-size: 1.5rem; }
    .admin-hero-icon  { width: 58px; height: 58px; font-size: 1.5rem; }
    .fancy-title-sub  { display: none; }
    .fancy-button     { padding: 0.9rem 1rem !important; }
    .fancy-icon       { width: 42px; height: 42px; font-size: 1.1rem; }
    .fancy-body       { padding: 1.2rem 1rem !important; }
    .fancy-badge      { display: none; }
    .fancy-edit-panel { margin: 0.4rem 0.5rem 0.8rem; padding: 1rem; }
}