/* SF UI Display Font Definitions */
@font-face {
    font-family: "SF UI Display";
    src: url("/fonts/SFUIDisplay/SFUIDisplay-Light.ttf") format("truetype");
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: "SF UI Display";
    src: url("/fonts/SFUIDisplay/SFUIDisplay-Regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "SF UI Display";
    src: url("/fonts/SFUIDisplay/SFUIDisplay-Medium.otf") format("opentype");
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: "SF UI Display";
    src: url("/fonts/SFUIDisplay/SFUIDisplay-Semibold.otf") format("opentype");
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: "SF UI Display";
    src: url("/fonts/SFUIDisplay/SFUIDisplay-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
}

/* Admin Panel Styles */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --sidebar-width: 250px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Authentication Pages */
.auth-content {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    font-family: 'SF UI Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
    margin-top: 0; /* Remove top margin for auth pages */
}

.auth-container {
    width: 100%;
    max-width: 500px;
    border: 2px solid #e5e5e5;
    background: white;
    padding: 40px;
    border-radius: 12px;
}

.auth-form {
    width: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

/* Compact master admin login form */
.master-admin-login .auth-content {
    min-height: calc(100vh - 50px); /* Account for navbar height */
    align-items: center;
    justify-content: center;
}

.master-admin-login .auth-container {
    padding: 30px;
    margin-top: 0; /* Remove top margin since we're using flexbox centering */
}

.master-admin-login .auth-header {
    margin-bottom: 25px;
}

.master-admin-login .auth-header h1 {
    margin-bottom: 6px;
    font-size: 24px;
}

.master-admin-login .auth-header p {
    margin-bottom: 12px;
}

.master-admin-login .form-group {
    margin-bottom: 18px;
}

.master-admin-login .form-row {
    margin-bottom: 18px;
}

.master-admin-login button.btn {
    margin-top: 30px !important;
    margin-bottom: 12px !important;
}

.master-admin-login .setup-message {
    margin-bottom: 20px;
}

.master-admin-login .security-note {
    padding: 12px;
    margin-top: 15px;
    font-size: 12px;
}

/* Compact shop login form */
.shop-admin-login .auth-header {
    margin-bottom: 20px;
}

.shop-admin-login .auth-header h1 {
    margin-bottom: 4px;
}

.shop-admin-login .auth-header p {
    margin-bottom: 15px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.master-badge {
    display: inline-block;
    background: #000000;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shop-badge {
    display: inline-block;
    background: #007AFF;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-header p {
    color: #666;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

/* Compact spacing for shop login */
.shop-admin-login .form-group {
    margin-bottom: 15px;
}

.shop-admin-login .form-row {
    margin-bottom: 15px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: white;
    margin-bottom: 5px;
}

.form-group input:focus {
    outline: none;
    background: white;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.form-group input:hover {
    border-color: #ccc;
}

/* Button Reset and Custom Styling */
button.btn {
    /* Reset Bootstrap and browser defaults */
    all: unset !important;
    box-sizing: border-box !important;
    
    /* Custom button styling */
    padding: 12px 30px !important;
    background: #000000 !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    font-family: 'SF UI Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    cursor: pointer !important;
    align-items: center !important;
    display: flex !important;
    margin-top: 40px !important;
    margin-bottom: 15px !important;
    transition: all 0.3s ease !important;
    margin-left: auto !important;
    margin-right: auto !important;
    justify-content: center !important;
    width: 100% !important;
    text-decoration: none !important;
    text-align: center !important;
}

button.btn .btn-text {
    color: white !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    visibility: visible !important;
}

button.btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
    background: #333333 !important;
    color: white !important;
}

button.btn:hover .btn-text {
    color: white !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

button.btn:active {
    transform: translateY(1px) !important;
}

button.btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

button.btn:disabled .btn-text {
    color: white !important;
}

.security-note {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    font-size: 13px;
    color: #6c757d;
    text-align: center;
}

/* Compact security note for shop login */
.shop-admin-login .security-note {
    padding: 10px;
    margin-top: 10px;
    font-size: 11px;
}

/* Compact button spacing for shop login */
.shop-admin-login button.btn {
    margin-top: 25px !important;
    margin-bottom: 10px !important;
}

/* Step authentication styling */
.auth-step {
    width: 100%;
}

.welcome-message {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.info-message {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.success-message {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-actions .btn {
    flex: 1;
    margin: 0;
}

.btn-secondary {
    background: #6c757d !important;
    color: white !important;
}

.btn-secondary:hover {
    background: #5a6268 !important;
}

.setup-message {
    text-align: center;
    margin-bottom: 25px;
}

.setup-message h3 {
    color: #1a1a1a;
    margin-bottom: 8px;
    font-size: 20px;
}

.setup-message p {
    color: #666;
    font-size: 14px;
}

.security-note i {
    color: #000000;
    margin-right: 5px;
}

.divider {
    margin: 20px 0;
    text-align: center;
    position: relative;
    color: #666;
    font-size: 14px;
}

/* Compact divider for shop login */
.shop-admin-login .divider {
    margin: 15px 0 10px 0;
    font-size: 12px;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e5e5;
    z-index: 1;
}

.divider span {
    background: white;
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

.forgot-password {
    text-align: center;
}

/* Compact forgot password section for shop login */
.shop-admin-login .forgot-password {
    margin-bottom: 10px;
}

.forgot-password a {
    color: #007AFF;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.forgot-password a:hover {
    text-decoration: underline;
}

.helper-text {
    display: block;
    margin-top: 5px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
}

/* Compact helper text for shop login */
.shop-admin-login .helper-text {
    margin-top: 3px;
    margin-bottom: 5px;
    font-size: 0.8rem;
}

.helper-text i {
    margin-right: 5px;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #fcc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.success-message {
    background: #efe;
    color: #3c3;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #cfc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff40;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.btn-loading {
    opacity: 0.8;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .auth-container {
        margin: 20px;
        padding: 30px 20px;
        border: 1px solid #e5e5e5;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-row .form-group {
        margin-bottom: 20px;
    }

    .auth-content {
        padding: 20px;
    }

    /* Mobile adjustments for master admin login */
    .master-admin-login .auth-content {
        min-height: calc(100vh - 50px); /* Account for navbar height on mobile */
        padding-top: 20px;
        align-items: center;
        justify-content: center;
    }

    .master-admin-login .auth-container {
        margin: 15px;
        padding: 25px 15px;
        margin-top: 0; /* Remove top margin for mobile centering */
    }

    .master-admin-login .auth-header h1 {
        font-size: 22px;
    }
}

/* Main Content Layout */
.main-content {
    margin-top: 70px;
    padding: 2rem;
    min-height: calc(100vh - 70px);
}

/* Dashboard Cards */
.stats-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stats-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
}

.stats-card .icon.primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
}

.stats-card .icon.success {
    background: linear-gradient(135deg, var(--success-color), #1e7e34);
}

.stats-card .icon.warning {
    background: linear-gradient(135deg, var(--warning-color), #e0a800);
}

.stats-card .icon.danger {
    background: linear-gradient(135deg, var(--danger-color), #bd2130);
}

.stats-card .icon.info {
    background: linear-gradient(135deg, var(--info-color), #117a8b);
}

.stats-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: var(--dark-color);
}

.stats-card p {
    margin: 0;
    color: var(--secondary-color);
    font-weight: 500;
}

/* Page Headers */
.page-header {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.page-header h1 {
    margin: 0;
    color: var(--dark-color);
    font-weight: 600;
}

.page-header .breadcrumb {
    margin: 0;
    background: none;
    padding: 0;
}

/* Tables */
.table-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.table-card .card-header {
    background: var(--light-color);
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

.table-card .table {
    margin: 0;
}

.table-card .table th {
    border-top: none;
    background: var(--light-color);
    font-weight: 600;
    color: var(--dark-color);
}

/* Buttons */

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #1e7e34);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #bd2130);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #e0a800);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 8px;
}

/* Modern Button Variants */
.btn-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    text-decoration: none;
    display: inline-block;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: #374151;
    transition: all 0.3s ease;
}

.btn-ghost:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

/* Forms */
.form-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

/* Status indicators */
.status-active {
    background: var(--success-color);
    color: white;
}

.status-inactive {
    background: var(--secondary-color);
    color: white;
}

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

/* Modern Master Admin Dashboard Styles */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.dashboard-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hero-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0 0 2rem 0;
    font-weight: 300;
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.hero-stat {
    text-align: center;
}

.hero-stat .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-stat .stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* System Status Card */
.system-status-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
    animation: pulse 2s infinite;
}

.status-indicator.online {
    background: #4ade80;
}

.status-indicator.offline {
    background: #ef4444;
}

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

.status-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.status-content p {
    margin: 0 0 1rem 0;
    opacity: 0.8;
}

.status-metrics {
    display: flex;
    gap: 1rem;
}

.metric {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.stat-card.customers-card::before {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.stat-card.shops-card::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.stat-card.api-card::before {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

.stat-card.health-card::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

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

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.customers-card .stat-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.shops-card .stat-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.api-card .stat-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.health-card .stat-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.stat-trend.positive {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.stat-trend.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.stat-trend.neutral {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    color: #1f2937;
}

.stat-label {
    font-size: 1rem;
    color: #6b7280;
    margin: 0 0 1.5rem 0;
    font-weight: 500;
}

.stat-breakdown {
    display: flex;
    gap: 2rem;
}

.breakdown-item {
    text-align: center;
}

.breakdown-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.breakdown-label {
    font-size: 0.8rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.health-indicators {
    display: flex;
    gap: 1rem;
}

.health-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.indicator-dot.online {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.indicator-dot.offline {
    background: #ef4444;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

.content-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.section-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-refresh {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-refresh:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Activity Tabs */
.activity-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: #f9fafb;
    padding: 0.5rem;
    border-radius: 12px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn.active {
    background: white;
    color: #1f2937;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
    color: #374151;
}

.tab-content {
    display: none;
}

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

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: #f9fafb;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: #f3f4f6;
    transform: translateX(5px);
}

.activity-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

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

.activity-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.activity-time {
    font-size: 0.8rem;
    color: #6b7280;
}

.activity-description {
    margin: 0 0 1rem 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.activity-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #6b7280;
}

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

.status-badge.active {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.status-badge.inactive {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.status-badge.suspended {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #6b7280;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h4 {
    margin: 0 0 0.5rem 0;
    color: #374151;
}

.empty-state p {
    margin: 0 0 2rem 0;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 2rem;
}

.quick-actions h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-grid {
    display: grid;
    gap: 1rem;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: #f9fafb;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.action-card:hover {
    background: white;
    border-color: #e5e7eb;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.action-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.action-content p {
    margin: 0;
    font-size: 0.8rem;
    color: #6b7280;
}

/* System Info */
.system-info h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-grid {
    display: grid;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.info-label {
    font-weight: 500;
    color: #374151;
}

.info-value {
    font-weight: 600;
    color: #1f2937;
}

/* Animations */
.animate-in {
    animation: slideInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }
    
    .dashboard-hero {
        padding: 2rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .system-status-card {
        min-width: auto;
    }
    
    .stat-breakdown {
        flex-direction: column;
        gap: 1rem;
    }
    
    .activity-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .status-metrics {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .activity-item {
        flex-direction: column;
        text-align: center;
    }
    
    .activity-avatar {
        align-self: center;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
        margin-top: 60px;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .auth-content {
        padding: 1rem;
    }
    
    .auth-card {
        margin: 1rem;
    }
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Test page specific styles */
.test-result {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1rem;
    border-left: 4px solid var(--primary-color);
}

.json-display {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
}

/* Modern Master Admin Dashboard Styles */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.dashboard-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hero-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0 0 2rem 0;
    font-weight: 300;
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.hero-stat {
    text-align: center;
}

.hero-stat .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-stat .stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* System Status Card */
.system-status-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
    animation: pulse 2s infinite;
}

.status-indicator.online {
    background: #4ade80;
}

.status-indicator.offline {
    background: #ef4444;
}

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

.status-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.status-content p {
    margin: 0 0 1rem 0;
    opacity: 0.8;
}

.status-metrics {
    display: flex;
    gap: 1rem;
}

.metric {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.stat-card.customers-card::before {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.stat-card.shops-card::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.stat-card.api-card::before {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

.stat-card.health-card::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

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

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.customers-card .stat-icon {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.shops-card .stat-icon {
    background: linear-gradient(135deg, #10b981, #059669);
}

.api-card .stat-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.health-card .stat-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.stat-trend.positive {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.stat-trend.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.stat-trend.neutral {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    color: #1f2937;
}

.stat-label {
    font-size: 1rem;
    color: #6b7280;
    margin: 0 0 1.5rem 0;
    font-weight: 500;
}

.stat-breakdown {
    display: flex;
    gap: 2rem;
}

.breakdown-item {
    text-align: center;
}

.breakdown-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.breakdown-label {
    font-size: 0.8rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.health-indicators {
    display: flex;
    gap: 1rem;
}

.health-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.indicator-dot.online {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.indicator-dot.offline {
    background: #ef4444;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

.content-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.section-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-refresh {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-refresh:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Activity Tabs */
.activity-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: #f9fafb;
    padding: 0.5rem;
    border-radius: 12px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn.active {
    background: white;
    color: #1f2937;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
    color: #374151;
}

.tab-content {
    display: none;
}

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

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: #f9fafb;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: #f3f4f6;
    transform: translateX(5px);
}

.activity-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

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

.activity-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.activity-time {
    font-size: 0.8rem;
    color: #6b7280;
}

.activity-description {
    margin: 0 0 1rem 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.activity-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #6b7280;
}

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

.status-badge.active {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.status-badge.inactive {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.status-badge.suspended {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #6b7280;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h4 {
    margin: 0 0 0.5rem 0;
    color: #374151;
}

.empty-state p {
    margin: 0 0 2rem 0;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 2rem;
}

.quick-actions h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-grid {
    display: grid;
    gap: 1rem;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: #f9fafb;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.action-card:hover {
    background: white;
    border-color: #e5e7eb;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.action-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.action-content p {
    margin: 0;
    font-size: 0.8rem;
    color: #6b7280;
}

/* System Info */
.system-info h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-grid {
    display: grid;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.info-label {
    font-weight: 500;
    color: #374151;
}

.info-value {
    font-weight: 600;
    color: #1f2937;
}

/* Animations */
.animate-in {
    animation: slideInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }
    
    .dashboard-hero {
        padding: 2rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .system-status-card {
        min-width: auto;
    }
    
    .stat-breakdown {
        flex-direction: column;
        gap: 1rem;
    }
    
    .activity-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .status-metrics {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .activity-item {
        flex-direction: column;
        text-align: center;
    }
    
    .activity-avatar {
        align-self: center;
    }
}
