/* =========================================================
   DESIGN TOKENS
========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --primary: #1b0c40;
    --secondary: #1b0c40;

    --primary-soft: rgba(201, 97, 254, 0.14);
    --secondary-soft: rgba(158, 134, 255, 0.18);

    --text-main: #111827;
    --text-muted: #6b7280;

    --bg-main: #f6f7fb;
    --bg-card: #ffffff;

    --border: #e5e7eb;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 18px;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.08);

    --transition: all 0.25s ease;
}

/* =========================================================
   GLOBAL RESET
========================================================= */
* {
    box-sizing: border-box;
}

body {
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    margin: 0;
    background: radial-gradient(circle at top,
            rgba(158, 134, 255, 0.08),
            var(--bg-main) 40%);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Zalando Sans Expanded", sans-serif !important;
}

a {
    color: inherit;
    text-decoration: none;
}

/* =========================================================
   LAYOUT
========================================================= */
.admin-wrapper {
    min-height: 100vh;
}

.content {
    padding-left: 0;
}

main {
    width: calc(100% - 260px);
}

/* =========================================================
   SIDEBAR
========================================================= */
.sidebar {
    width: 260px;
    background-color: #1b0c40;
    border-right: 1px solid var(--border);
    min-height: 100vh;
    position: sticky;
    top: 0;
}

.sidebar-header {
    background-color: #fff;
    color: #fff;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.sidebar-header h5 {
    font-weight: 600;
    letter-spacing: 0.3px;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 6px;
    border-radius: 10px;
    font-weight: 500;
    color: #fff;
    transition: var(--transition);
}

.sidebar .nav-link:hover {
    background: var(--primary-soft);
    color: #ffff;
}

.sidebar .nav-link.active {
    background: #fff;
    color: #1b0c40;
    box-shadow: var(--shadow-sm);
}

/* Icons */
.nav-icon {
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo {
    max-width: 150px;
}

.nav-icon svg {
    width: 25px;
    height: 25px;
}

/* Active icon color */
.sidebar .nav-link.active svg {
    stroke: #1b0c40;
}

/* =========================================================
   TOPBAR
========================================================= */
.topbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.topbar h6 {
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* =========================================================
   CARDS
========================================================= */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    border-radius: var(--radius-lg) !important
}

.card-body {
    font-size: 14px;
}

/* =========================================================
   BUTTONS
========================================================= */
.btn {
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg,
            var(--primary),
            var(--secondary));
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline-secondary {
    border-color: var(--border);
}

/* =========================================================
   TABLES
========================================================= */
.table {
    font-size: 14px;
}

.table thead th {
    background: linear-gradient(to bottom,
            #fafafa,
            #f3f4f6);
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: linear-gradient(to right,
            var(--primary-soft),
            transparent);
}

/* =========================================================
   BADGES
========================================================= */
.badge {
    padding: 6px 12px;
    font-weight: 500;
    border-radius: 999px;
}

.badge.bg-success {
    background: rgba(34, 197, 94, 0.18) !important;
    color: #15803d;
}

.badge.bg-danger {
    background: rgba(239, 68, 68, 0.18) !important;
    color: #b91c1c;
}

.badge.bg-warning {
    background: rgba(234, 179, 8, 0.22) !important;
    color: #92400e;
}

.badge.bg-info {
    background: var(--secondary-soft) !important;
    color: var(--secondary);
}

/* =========================================================
   FORMS
========================================================= */
.form-label {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-muted);
}

.form-control,
.form-select {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 10px 12px;
    font-size: 14px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

/* =========================================================
   SWITCHES
========================================================= */
.form-check-input {
    width: 2.4em;
    height: 1.3em;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* =========================================================
   PAGINATION
========================================================= */
.pagination .page-link {
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    transition: var(--transition);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg,
            var(--primary),
            var(--secondary));
    border: none;
    color: #fff;
}

/* =========================================================
   DASHBOARD STATS
========================================================= */
.stat-card {
    background: #fff;
    color: #1b0c40;
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-md);
}

.stat-card .stat-value {
    font-size: 26px;
    font-weight: 700;
}

.stat-card .stat-label {
    font-size: 13px;
    opacity: 0.9;
}

/* =========================================================
   UTILITIES
========================================================= */
.text-muted {
    color: var(--text-muted) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

/* =========================================================
   ADMIN FOOTER
========================================================= */
.admin-footer {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    border-top: 1px solid var(--border);
    padding: 14px 0;
    font-size: 13px;
}

.footer-inner {
    padding: 0 16px;
}

.footer-left {
    color: var(--text-muted);
}

.footer-right .footer-link {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-right .footer-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* =========================================================
   STICKY FOOTER FIX
========================================================= */
.admin-wrapper {
    min-height: 100vh;
    display: flex;
}

.content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Push footer to bottom */
.admin-footer {
    margin-top: auto;
}

.topbar {
    overflow: visible !important;
    position: relative;
    z-index: 1050;
}

.dropdown-menu {
    z-index: 1060;
}

.admin-dropdown {
    width: auto;
    border-radius: 12px;
    padding: 6px 0;
}

.dropdown-toggle::after {
    display: none;
}

.admin-dropdown .dropdown-item {
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 8px;
    margin: 2px 0px;
}

.admin-dropdown .dropdown-item:hover {
    background-color: #f1f5f9;
}

.admin-dropdown svg {
    flex-shrink: 0;
}

.dashboard .stat-card {
    background: #fff;
    color: #000;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
}

.dashboard .stat-card .card-body {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dashboard .stat-card small {
    font-size: 13px;
    opacity: 0.85;
}

.dashboard .stat-card h4 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

/* Icon Container */
.dashboard .stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    font-size: 24px;
    color: var(--primary);
}

/* Gradient Variants */
.bg-gradient-primary {
    background: linear-gradient(135deg, rgba(14, 17, 194, 0.85), rgba(39, 168, 204, 0.7));
}

/* .bg-gradient-secondary {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.85), rgba(81, 59, 165, 0.5));
}

.bg-gradient-info {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.85), rgba(0, 200, 255, 0.7));
}

.bg-gradient-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.85), rgba(255, 209, 128, 0.7));
} */




/* =========================================================
   ANALYTICS STAT CARDS
========================================================= */
.analytics .stat-body {
    display: flex;
    align-items: center;
    gap: 16px;
}

.analytics .stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1b0c40;
    flex-shrink: 0;
    background-color: #fff;
}

/* Trend Badges */
.analytics .trend-badge {
    display: inline-block;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

.trend-up {
    background: #28a745;
    color: #fff;
}

.trend-down {
    background: #dc3545;
    color: #fff;
}

/* =========================================================
   ANALYTICS CARDS
========================================================= */
.analytics-card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.analytics-card-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 14px 18px;
}

.card-title-with-icon {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.card-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

/* =========================================================
   COUNTRY LIST
========================================================= */
.country-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.country-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.country-item:last-child {
    margin-bottom: 0;
}

.country-name {
    font-size: 14px;
    font-weight: 500;
}

.country-right {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 140px;
}

.country-bar {
    flex: 1;
    height: 6px;
    background: #f1f3f6;
    border-radius: 6px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    display: block;
    border-radius: 6px;
}

/* Bar Colors */
.bar-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.bar-secondary {
    background: linear-gradient(135deg, rgba(158, 134, 255, 0.9), rgba(201, 97, 254, 0.7));
}

.bar-muted {
    background: #cfd4e0;
}


.qr-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f7f8fa;
    display: flex;
    float: inline-start;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: all 0.25s ease;
}

/* SVG icon styling */
.qr-icon svg {
    width: 25px;
    height: 25px;
    color: #1b0c40;
    transition: all 0.25s ease;
}

.dataTables_filter input {
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 6px 10px;
}

.table td,
.table th {
    vertical-align: middle;
}

.badge {
    font-weight: 500;
    padding: 6px 10px;
}

.dataTables_wrapper .btn {
    margin-right: 5px;
}

.dataTables_filter input,
.dataTables_length select {
    border-radius: 6px;
    padding: 4px 8px;
}

.table thead th {
    white-space: nowrap;
}

.dataTables_length {
    width: 30%;
    float: inline-start;
}

.dataTables_filter {
    width: 33%;
    float: inline-end;
}

.dt-buttons .btn {
    color: #fff;
    padding: 1px 16px;
    margin: 0px;
}

div.dataTables_wrapper div.dataTables_length select {
    width: 60px;
}

div.dataTables_wrapper div.dataTables_info {
    float: inline-start;
}

.pagination .paginate_button {
    margin: 0 5px;
}

.pagination .paginate_button.next {
    margin-right: 0;
}

/* AUTH PAGES */
.auth-body {
    min-height: 100vh;
    background: #1b0c40;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
}

.auth-container {
    width: 100%;
    padding: 20px;
}

.auth-card {
    max-width: 420px;
    margin: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    padding: 30px;
}

.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

.auth-logo {
    width: 140px;
    margin: 0 auto;
}

.auth-header h4 {
    font-weight: 700;
    margin-bottom: 5px;
}

.auth-header p {
    font-size: 14px;
    color: #777;
}

.auth-card .form-group {
    margin-bottom: 15px;
}

.auth-card .form-group label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.auth-card .form-control {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.auth-card .form-control:focus {
    outline: none;
    border-color: rgb(201, 97, 254);
}

.auth-card .form-check-input {
    width: 20px;
    height: 20px;
}

.btn-auth {
    width: 100%;
    padding: 12px;
    background: #1b0c40;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.btn-auth:hover {
    opacity: 0.95;
}

.auth-link {
    font-size: 13px;
    color: rgb(201, 97, 254);
    text-decoration: none;
}

.auth-back {
    text-align: center;
    margin-top: 15px;
}

.auth-back a {
    font-size: 13px;
    text-decoration: none;
    color: rgb(201, 97, 254);
}

.auth-footer {
    text-align: center;
    font-size: 12px;
    color: #aaa;
    margin-top: 25px;
}