/* Modesq Brand Dashboard */

:root {
    --color-primary: #000000;
    --color-secondary: #696969;
    --color-accent: #e7054c;
    --color-bg: #F3F3F6;
    --color-white: #ffffff;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-primary);
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: var(--font-heading);
    font-weight: 500 !important;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #F3F3F6; }
::-webkit-scrollbar-thumb { background: #d4d4d4; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

/* Active nav */
.nav-link.is-active {
    background-color: #F3F3F6 !important;
    color: #000 !important;
    font-weight: 600;
}
.nav-link.is-active i { color: #e7054c; }

/* Stat cards */
.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    border: 1px solid #ebebeb;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.stat-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.07);
    transform: translateY(-1px);
}

/* Icon containers */
.icon-box {
    width: 44px; height: 44px;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; flex-shrink: 0;
}
.icon-accent { background: rgba(231,5,76,0.09); color: #e7054c; }
.icon-dark   { background: rgba(0,0,0,0.07); color: #000; }
.icon-muted  { background: rgba(105,105,105,0.1); color: #696969; }
.icon-green  { background: rgba(5,163,74,0.09); color: #05a34a; }

/* Generic card */
.card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #ebebeb;
    overflow: hidden;
}
.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid #f2f2f2;
    display: flex; align-items: center; justify-content: space-between;
}
.card-body { padding: 22px; }

/* Badges */
.badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11.5px; font-weight: 500; letter-spacing: .01em;
    white-space: nowrap;
}
.badge-success { background: #e8f9f0; color: #0a6e35; }
.badge-warning { background: #fff8e6; color: #7a5500; }
.badge-danger  { background: #fff0f3; color: #b5002a; }
.badge-info    { background: #eef2ff; color: #3730a3; }
.badge-neutral { background: #f3f3f6; color: #696969; }
.badge-accent  { background: rgba(231,5,76,0.1); color: #e7054c; }

/* Tables */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.data-table thead th {
    background: #fafafa;
    color: #9ca3af;
    font-size: 10.5px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .08em;
    padding: 11px 16px;
    border-bottom: 1px solid #ebebeb;
}
.data-table tbody td {
    padding: 13px 16px;
    font-size: 13.5px; color: #111;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #fafafa; }

/* Influencer avatar */
.avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #f3f3f6;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; color: #696969;
    flex-shrink: 0; user-select: none;
}
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 18px; border-radius: 9px;
    font-size: 13.5px; font-weight: 500; border: none; cursor: pointer;
    transition: background-color .15s ease, transform .1s ease, box-shadow .15s ease;
    font-family: var(--font-body);
    white-space: nowrap;
    justify-content: center;
    text-align: center;
}
.btn:active { transform: scale(.98); }

.btn-primary { background: #000; color: #fff; }
.btn-primary:hover { background: #1a1a1a; }

.btn-accent { background: #e7054c; color: #fff; }
.btn-accent:hover { background: #c8043f; }

.btn-outline {
    background: transparent; color: #000;
    border: 1px solid #e0e0e0;
}
.btn-outline:hover { border-color: #000; background: #fafafa; }

.btn-ghost { background: transparent; color: #696969; padding: 7px 12px; }
.btn-ghost:hover { background: #f3f3f6; color: #000; }

/* Form inputs */
.form-input {
    width: 100%; padding: 10px 14px;
    border: 1px solid #e5e5e5; border-radius: 9px;
    font-size: 13.5px; font-family: var(--font-body);
    outline: none; background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
    color: #111;
}
.form-input:focus {
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}
.form-label {
    display: block; font-size: 13px; font-weight: 500;
    color: #374151; margin-bottom: 6px;
}

/* Alerts */
.alert {
    padding: 12px 16px; border-radius: 9px;
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 13.5px; margin-bottom: 16px;
}
.alert-danger { background: #fff0f3; border: 1px solid rgba(231,5,76,.15); color: #b5002a; }
.alert-success { background: #e8f9f0; border: 1px solid rgba(10,110,53,.15); color: #0a6e35; }
.alert-warning { background: #fff8e6; border: 1px solid rgba(122,85,0,.15); color: #7a5500; }

/* Animations */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.animate-slide-up { animation: slideUp .3s ease-out; }
.animate-fade-in  { animation: fadeIn .25s ease-out; }

/* Spinner */
.spinner {
    display: inline-block; width: 18px; height: 18px;
    border: 2px solid #e5e5e5; border-top-color: var(--color-accent);
    border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Progress bar */
.progress { height: 4px; background: #f0f0f0; border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; background: #e7054c; }

/* Mobile (below Tailwind's lg breakpoint, matching the hamburger's lg:hidden) */
@media (max-width: 1023.98px) {
    aside#sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 4px 0 24px rgba(0,0,0,0.08); }
    aside#sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0 !important; }
}

@media print {
    aside#sidebar { display: none; }
    .main-content { margin-left: 0 !important; }
}

/* ── DataTables ──────────────────────────────────────────── */

.dataTables_wrapper { width: 100%; overflow-x: auto;}

/* Top control row: length (left) + search (right) */
.dt-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid #ebebeb;
    gap: 10px;
    background: #fff;
}

/* Bottom row: info (left) + pagination (right) */
.dt-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-top: 1px solid #ebebeb;
    gap: 8px;
    background: #fff;
}

/* ── Length "Show N entries" ───────────────────────── */
.dataTables_length {
    display: flex;
    align-items: center;
}
.dataTables_length label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #9ca3af;
    font-weight: normal;
    margin: 0;
    white-space: nowrap;
}
.dataTables_length select {
    height: 32px;
    padding: 0 26px 0 10px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    font-size: 12px;
    font-family: var(--font-body);
    outline: none;
    color: #374151;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%239ca3af' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px;
}
.dataTables_length select:focus { border-color: #000; }

/* ── Search ──────────────────────────────────────── */
.dataTables_filter {
    display: flex;
    align-items: center;
}
.dataTables_filter label {
    display: flex;
    align-items: center;
    position: relative;
    font-size: 0;        /* collapses the "Search:" text node DataTables injects */
    margin: 0;
}
.dataTables_filter label::before {
    content: '\f002';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 11px;
    color: #c4c4c4;
    position: absolute;
    left: 10px;
    pointer-events: none;
    z-index: 1;
}
.dataTables_filter input[type="search"],
.dataTables_filter input[type="text"] {
    font-size: 13px !important;
    width: 200px;
    height: 32px;
    padding: 0 12px 0 30px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: var(--font-body);
    outline: none;
    color: #111;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}
.dataTables_filter input[type="search"]:focus,
.dataTables_filter input[type="text"]:focus {
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}

/* ── Record count info ───────────────────────────── */
.dataTables_info {
    font-size: 12px;
    color: #b0b8c4;
    white-space: nowrap;
}

/* ── Pagination ──────────────────────────────────── */
.dataTables_paginate {
    display: flex;
    align-items: center;
    gap: 2px;
}
.dataTables_paginate span {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.paginate_button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 28px;
    height: 28px;
    padding: 0 7px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: background .1s ease, color .1s ease;
    color: #6b7280 !important;
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    user-select: none;
    font-family: var(--font-body);
    white-space: nowrap;
}
.paginate_button:not(.disabled):not(.current):hover {
    background: #f3f4f6 !important;
    color: #111 !important;
    text-decoration: none !important;
}
.paginate_button.current,
.paginate_button.current:hover {
    background: #111 !important;
    color: #fff !important;
    text-decoration: none !important;
    cursor: default;
}
.paginate_button.disabled,
.paginate_button.disabled:hover {
    color: #d1d5db !important;
    cursor: default !important;
    background: transparent !important;
    opacity: 0.4;
}

/* ── Sort arrows ─────────────────────────────────── */
.data-table thead th.sorting,
.data-table thead th.sorting_asc,
.data-table thead th.sorting_desc { cursor: pointer; }
.data-table thead th.sorting::after,
.data-table thead th.sorting_asc::after,
.data-table thead th.sorting_desc::after {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 5px;
    font-size: 8px;
}
.data-table thead th.sorting::after      { content: '\f0dc'; opacity: 0.25; }
.data-table thead th.sorting_asc::after  { content: '\f0de'; opacity: 0.65; }
.data-table thead th.sorting_desc::after { content: '\f0dd'; opacity: 0.65; }
