/* 2KAPay - Ionic Design System Customizations */

/* ROOT VARIABLES - Syncing with Ionic */
:root {
    --ion-color-primary: #0044cc;
    --ion-color-primary-rgb: 0, 68, 204;
    --ion-color-primary-contrast: #ffffff;
    --ion-color-primary-contrast-rgb: 255, 255, 255;
    --ion-color-primary-shade: #003cb3;
    --ion-color-primary-tint: #1a57d1;

    --ion-color-secondary: #00adef;
    --ion-color-secondary-rgb: 0, 173, 239;
    --ion-color-secondary-contrast: #ffffff;
    --ion-color-secondary-contrast-rgb: 255, 255, 255;
    --ion-color-secondary-shade: #0098d2;
    --ion-color-secondary-tint: #1ab5f1;

    --ion-font-family: 'Outfit', sans-serif;

    /* Custom Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f4f7fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
}

/* DARK MODE - Bootstrap 5 Support */
[data-bs-theme='dark'] {
    --ion-background-color: #0b0e14;
    --ion-background-color-rgb: 11, 14, 20;
    --ion-text-color: #f1f3f5;
    --ion-text-color-rgb: 241, 243, 245;

    --bg-primary: #0b0e14;
    --bg-secondary: #1a1d23;
    --bg-tertiary: #25282e;
    --text-primary: #f1f3f5;
    --text-secondary: #adb5bd;
    --border-color: #2d3238;
}

/* GLOBAL RESET */
html,
body {
    height: 100%;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
}

/* HERO SECTION */
.hero-container {
    padding: 80px 20px 60px 20px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    text-align: center;
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-title {
    font-size: clamp(2rem, 8vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px auto;
}

/* CUSTOM CARDS */
.kapay-card {
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    background: var(--bg-primary);
    margin-bottom: 16px;
}

/* UTILS */
.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 16px;
}

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

.ion-padding {
    padding: 16px;
}

.w-100 {
    width: 100%;
}

.nav-logo-img {
    transition: transform 0.3s ease;
}

.nav-logo-img:hover {
    transform: rotate(-10deg) scale(1.1);
}

/* DASHBOARD SPECIFIC */
.stat-box {
    border-radius: 12px;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.transaction-item {
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
}

/* AUTH PAGES */
.auth-page {
    max-width: 450px;
    margin: 40px auto;
}

/* STYLE ADDITIONS FOR NEW TEMPLATES */
.code-block {
    background: #1e1e1e;
    color: #00adef;
    padding: 15px;
    border-radius: 8px;
    font-family: monospace;
    overflow-x: auto;
    border: 1px solid #333;
}

.featured-card {
    border: 2px solid var(--ion-color-secondary) !important;
    transform: scale(1.02);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

[data-bs-theme='dark'] .bg-white {
    background-color: var(--bg-secondary) !important;
}

[data-bs-theme='dark'] .bg-light {
    background-color: var(--bg-tertiary) !important;
}

.rounded-list {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* ANIMATIONS */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* DASHBOARD LAYOUT & SIDEBAR */
.dashboard-wrapper {
    display: flex;
    min-height: calc(100vh - 61px);
}

.sidebar {
    width: 280px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 61px;
    height: calc(100vh - 61px);
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.dashboard-content {
    flex: 1;
    padding: 2rem;
    background: var(--bg-secondary);
}

.nav-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin: 1.5rem 0 0.75rem 0.5rem;
    font-weight: 700;
}

.nav-pills .nav-link {
    color: var(--text-primary);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.nav-pills .nav-link i {
    font-size: 1.25rem;
    margin-right: 0.75rem;
}

.nav-pills .nav-link:hover {
    background: var(--bg-tertiary);
    transform: translateX(5px);
}

.nav-pills .nav-link.active {
    background: var(--ion-color-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 68, 204, 0.2);
}

/* CARDS AND STATS */
.stat-card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    background: var(--bg-primary);
    height: 100%;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
}

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

.dot-online {
    background-color: #28a745;
    box-shadow: 0 0 8px #28a745;
}

.dot-offline {
    background-color: #dc3545;
}

/* REUSABLE STYLES */
.rounded-4 {
    border-radius: 1rem !important;
}

.glass-effect {
    background: rgba(var(--ion-background-color-rgb), 0.7);
    backdrop-filter: blur(10px);
}

/* RESPONSIVE DESIGN */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        left: -280px;
        z-index: 1050;
        box-shadow: 10px 0 20px rgba(0, 0, 0, 0.1);
        width: 280px;
        height: 100vh;
        top: 0;
    }

    .sidebar.show {
        left: 0;
    }

    .dashboard-content {
        padding: 1.5rem 1rem;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        backdrop-filter: blur(2px);
    }

    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .stat-card {
        padding: 1.25rem;
    }

    .hero-container {
        padding-top: 60px;
    }
}