/* ========================================
   HiPay Admin Panel Styling
   ======================================== */

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #48bb78;
    --warning: #f6ad55;
    --danger: #f56565;
    --info: #4299e1;
    --light: #f7fafc;
    --dark: #2d3748;
    --sidebar-width: 280px;
    --topnav-height: 70px;
}

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body.admin-panel {
    background-color: #f5f7fa;
    color: #2d3748;
}

/* ========================================
   WRAPPER & LAYOUT
   ======================================== */

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-width);
}

.admin-body {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* ========================================
   SIDEBAR NAVIGATION
   ======================================== */

.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    overflow-y: auto;
    z-index: 1000;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    transition: transform 0.2s;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo-link i {
    font-size: 1.75rem;
}

.brand-text {
    font-size: 1.5rem;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.nav-section {
    padding: 0.5rem 0;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    position: relative;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-left-color: white;
    font-weight: 500;
}

.nav-item i {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item span:not(.badge) {
    flex: 1;
}

.nav-item .badge {
    margin-left: auto;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.system-status {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.status-item i {
    width: 16px;
    text-align: center;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: auto;
}

.status-dot.online {
    background-color: #48bb78;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ========================================
   TOP NAVIGATION BAR
   ======================================== */

.admin-topnav {
    height: var(--topnav-height);
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topnav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 2rem;
}

.topnav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.btn-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #2d3748;
}

.topnav-title {
    display: flex;
    align-items: center;
}

.topnav-title h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #2d3748;
}

.topnav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-wrapper {
    position: relative;
    width: 250px;
}

.search-input {
    padding-left: 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #f7fafc;
}

.search-wrapper i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #cbd5e0;
}

.quick-stats {
    display: flex;
    gap: 2rem;
    padding-left: 2rem;
    border-left: 1px solid #e2e8f0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: #718096;
    font-weight: 500;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
}

.notifications-dropdown,
.user-menu-dropdown {
    position: relative;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #2d3748;
    cursor: pointer;
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background-color: #f7fafc;
}

.badge-counter {
    position: absolute;
    top: -5px;
    right: -5px;
}

.btn-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-user:hover {
    background-color: #f7fafc;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-name {
    font-weight: 500;
    color: #2d3748;
}

.dropdown-menu {
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    color: #2d3748;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: #f7fafc;
    color: var(--primary);
}

.dropdown-item i {
    margin-right: 0.5rem;
    width: 18px;
    text-align: center;
}

/* ========================================
   BREADCRUMB
   ======================================== */

.breadcrumb-nav {
    margin-bottom: 1.5rem;
}

.breadcrumb {
    background-color: transparent;
    padding: 0;
    gap: 0.5rem;
}

.breadcrumb-item {
    font-size: 0.95rem;
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ========================================
   PAGE HEADER
   ======================================== */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.header-left h2 {
    margin: 0 0 0.25rem 0;
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
}

.header-left p {
    margin: 0;
    color: #718096;
}

.header-right {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ========================================
   DASHBOARD - METRICS
   ======================================== */

.dashboard-container {
    max-width: 100%;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.metric-card.warning {
    border-left: 4px solid var(--warning);
}

.metric-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.metric-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #718096;
}

.metric-header i {
    font-size: 1.5rem;
    color: var(--primary);
    opacity: 0.7;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.metric-subtitle {
    font-size: 0.85rem;
    color: #a0aec0;
    margin-bottom: 0.75rem;
}

.metric-change {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.metric-change.positive {
    color: var(--success);
}

.metric-change.negative {
    color: var(--danger);
}

.metric-action {
    display: inline-block;
    margin-top: 0.75rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.metric-action:hover {
    color: var(--primary-dark);
}

/* ========================================
   CARDS & TABLES
   ======================================== */

.card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    transition: all 0.2s;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background-color: #f7fafc;
}

.card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

.card-body {
    padding: 1.5rem;
}

.card-body.table-card {
    padding: 0;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    background-color: #f7fafc;
    font-size: 0.9rem;
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
}

.chart-controls .btn {
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
}

.table {
    margin-bottom: 0;
    font-size: 0.95rem;
    width: 100%;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table thead {
    background-color: #f7fafc;
}

.table thead th {
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    color: #4a5568;
    padding: 1rem 1rem;
    white-space: nowrap;
    vertical-align: middle;
}

.table tbody td {
    vertical-align: middle;
    padding: 1rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

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

.table tbody tr:hover {
    background-color: #f7fafc;
}

.merchant-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.merchant-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.website-card {
    position: relative;
}

.website-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.website-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

.website-url {
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
    color: #718096;
}

.website-url a {
    color: var(--primary);
    text-decoration: none;
}

.website-url a:hover {
    text-decoration: underline;
}

.website-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
}

.stat-label {
    color: #718096;
    font-weight: 500;
}

.stat-value {
    font-weight: 600;
    color: #2d3748;
}

.website-api {
    background-color: #f7fafc;
    padding: 0.75rem;
    border-radius: 6px;
}

.website-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ========================================
   BUTTONS & CONTROLS
   ======================================== */

.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background-color: #e2e8f0;
    color: #2d3748;
    border-color: #e2e8f0;
}

.btn-secondary:hover {
    background-color: #cbd5e0;
    border-color: #cbd5e0;
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: white;
}

.btn-outline-secondary {
    color: #718096;
    border-color: #cbd5e0;
    background-color: transparent;
}

.btn-outline-secondary:hover {
    background-color: #f7fafc;
    border-color: #a0aec0;
}

.btn-outline-danger {
    color: var(--danger);
    border-color: var(--danger);
    background-color: transparent;
}

.btn-outline-danger:hover {
    background-color: var(--danger);
    color: white;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
}

.btn-group-sm > .btn {
    padding: 0.35rem 0.5rem;
}

/* ========================================
   BADGES
   ======================================== */

.badge {
    border-radius: 20px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background-color: var(--primary);
    color: white;
}

.badge-success {
    background-color: var(--success);
    color: white;
}

.badge-warning {
    background-color: var(--warning);
    color: white;
}

.badge-danger {
    background-color: var(--danger);
    color: white;
}

.badge-info {
    background-color: var(--info);
    color: white;
}

.badge-secondary {
    background-color: #cbd5e0;
    color: #2d3748;
}

.badge-light {
    background-color: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

/* ========================================
   ALERTS
   ======================================== */

.alert {
    border-radius: 8px;
    border: 1px solid transparent;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.alert i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.alert-success {
    background-color: #f0fff4;
    border-color: #9ae6b4;
    color: #22543d;
}

.alert-danger {
    background-color: #fff5f5;
    border-color: #fc8181;
    color: #742a2a;
}

.alert-warning {
    background-color: #fffaf0;
    border-color: #fbd38d;
    color: #7c2d12;
}

.alert-info {
    background-color: #ebf8ff;
    border-color: #90cdf4;
    color: #2c5282;
}

.alert-dismissible .btn-close {
    flex-shrink: 0;
    margin-left: auto;
}

/* ========================================
   FORMS
   ======================================== */

.form-control,
.form-select {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-label {
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    transition: all 0.2s;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-label {
    color: #2d3748;
    font-weight: 500;
}

.input-group {
    display: flex;
    gap: 0;
}

.input-group .form-control {
    border-right: none;
}

.input-group-text {
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-left: none;
    padding: 0.5rem 0.75rem;
    color: #718096;
    font-weight: 500;
}

/* ========================================
   MODALS
   ======================================== */

.modal-content {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem;
    background-color: #f7fafc;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    padding: 1.5rem;
    background-color: #f7fafc;
}

/* ========================================
   TABS
   ======================================== */

.nav-tabs {
    border-bottom: 2px solid #e2e8f0;
    padding: 0 1.5rem;
    margin-bottom: 0;
}

.nav-tabs .nav-link {
    color: #718096;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 1rem 0;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-tabs .nav-link:hover {
    color: #2d3748;
    border-bottom-color: #e2e8f0;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background-color: transparent;
}

.tab-content {
    padding-top: 1.5rem;
}

.tab-pane {
    min-height: 400px;
}

/* ========================================
   STATUS CARDS
   ======================================== */

.status-card {
    text-align: center;
    padding: 1.5rem;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.status-card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.status-card h6 {
    font-size: 0.85rem;
    color: #718096;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.status-card p {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2d3748;
}

/* ========================================
   SYSTEM STATUS
   ======================================== */

.status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.status-icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.status-icon.online {
    color: var(--success);
}

.status-icon.warning {
    color: var(--warning);
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    background-color: #f0fff4;
    color: #22543d;
    border-radius: 4px;
}

.status-bar {
    margin: 0.5rem 0;
}

.progress {
    height: 6px;
    border-radius: 3px;
    background-color: #e2e8f0;
}

.progress-bar {
    background-color: var(--success);
}

/* ========================================
   QUICK ACTIONS
   ======================================== */

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    text-decoration: none;
    color: #2d3748;
    border-radius: 8px;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}

.quick-action-btn:hover {
    background-color: #f7fafc;
    color: var(--primary);
    border-color: var(--primary);
}

.quick-action-btn i {
    font-size: 1.5rem;
}

.quick-action-btn span {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ========================================
   ANALYTICS ROW
   ======================================== */

.analytics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.card-chart {
    display: flex;
    flex-direction: column;
}

.card-chart .card-body {
    position: relative;
    min-height: 350px;
}

/* ========================================
   PAGINATION
   ======================================== */

.pagination {
    display: flex;
    gap: 0.25rem;
}

.page-link {
    border: 1px solid #e2e8f0;
    color: var(--primary);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.page-link:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
}

.page-item.disabled .page-link {
    color: #cbd5e0;
    cursor: not-allowed;
}

/* ========================================
   FEE TIER TABLE
   ======================================== */

.fee-tier-table th {
    font-weight: 600;
    color: #4a5568;
    padding: 1rem;
}

.fee-tier-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Auth Layout Enhancements */
body.admin-auth {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.auth-container {
    min-height: 100vh;
    padding: 2rem 1rem;
}

.auth-container .card {
    border: none;
    border-radius: 16px;
}

.auth-container .form-control {
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.auth-container .form-control-lg {
    padding: 0.875rem 1.125rem;
    font-size: 1rem;
}

.auth-container .btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1.05rem;
}

/* Admin Panel Body Container */
.admin-body {
    padding: 2rem;
    max-width: 100%;
}

/* Container Adjustments */
@media (min-width: 1400px) {
    .dashboard-container,
    .admin-body .container-fluid {
        max-width: 1400px;
    }
}

@media (max-width: 992px) {
    .analytics-row {
        grid-template-columns: 1fr;
    }

    .quick-stats {
        display: none;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
    }

    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1050;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    /* Add overlay when sidebar is open */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
    }

    body.sidebar-open::before {
        opacity: 1;
        visibility: visible;
    }

    .admin-content {
        margin-left: 0;
    }

    .btn-menu-toggle {
        display: block;
    }

    .topnav-right {
        gap: 0.5rem;
    }

    .search-wrapper {
        display: none;
    }

    .quick-stats {
        display: none;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .admin-body {
        padding: 1rem;
    }

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

    .header-right {
        width: 100%;
        justify-content: flex-start;
    }

    .table {
        font-size: 0.85rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.75rem 0.5rem;
    }

    .card-header,
    .card-body,
    .card-footer {
        padding: 1rem;
    }

    .auth-container {
        padding: 1rem;
    }

    /* Better mobile navigation */
    .nav-item {
        padding: 0.875rem 1rem;
    }

    .nav-item span:not(.badge) {
        font-size: 0.95rem;
    }

    .sidebar-header {
        padding: 1.25rem 1rem;
    }
}

@media (max-width: 480px) {
    :root {
        --sidebar-width: 100%;
    }

    .topnav-title h1 {
        font-size: 1.1rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .metric-value {
        font-size: 2rem;
    }

    .table-responsive {
        font-size: 0.8rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }

    .website-card {
        padding: 0.75rem;
    }

    .card-header,
    .card-body,
    .card-footer {
        padding: 0.75rem;
    }

    .btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.75rem;
    }

    .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}
