/* TAMAYMO INVESTMENT GROUP - Premium Financial Design System */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --tamaymo-primary: #0b132b;
    --tamaymo-secondary: #1c2541;
    --tamaymo-accent: #3a506b;
    --tamaymo-gold: #f59e0b;
    --tamaymo-gold-dark: #d97706;
    --tamaymo-emerald: #10b981;
    --tamaymo-emerald-dark: #059669;
    --tamaymo-bg: #f8fafc;
    --tamaymo-card-bg: #ffffff;
    --tamaymo-border: #e2e8f0;
    --tamaymo-text: #0f172a;
    --tamaymo-muted: #64748b;
    --tamaymo-shadow: 0 10px 25px -5px rgba(11, 19, 43, 0.05), 0 8px 10px -6px rgba(11, 19, 43, 0.05);
    --tamaymo-shadow-lg: 0 20px 30px -10px rgba(11, 19, 43, 0.1);
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--tamaymo-bg);
    color: var(--tamaymo-text);
    -webkit-font-smoothing: antialiased;
    padding-bottom: 80px; /* Space for mobile bottom bar */
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
}

/* Custom Typography & Brand */
.brand-font {
    font-weight: 800;
    letter-spacing: -0.5px;
}

.text-gold {
    color: var(--tamaymo-gold) !important;
}

.bg-gold {
    background-color: var(--tamaymo-gold) !important;
    color: #ffffff;
}

.text-navy {
    color: var(--tamaymo-primary) !important;
}

.bg-navy {
    background-color: var(--tamaymo-primary) !important;
    color: #ffffff;
}

.text-emerald {
    color: var(--tamaymo-emerald) !important;
}

.bg-emerald {
    background-color: var(--tamaymo-emerald) !important;
    color: #ffffff;
}

/* Luxury Financial Cards */
.card-financial {
    background: #ffffff;
    border: 1px solid var(--tamaymo-border);
    border-radius: 16px;
    box-shadow: var(--tamaymo-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-financial:hover {
    transform: translateY(-2px);
    box-shadow: var(--tamaymo-shadow-lg);
}

.card-gradient-navy {
    background: linear-gradient(135deg, #0b132b 0%, #1c2541 100%);
    color: #ffffff;
    border: none;
    border-radius: 16px;
    box-shadow: 0 15px 30px -10px rgba(11, 19, 43, 0.3);
}

.card-gradient-gold {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    color: #ffffff;
    border: none;
    border-radius: 16px;
    box-shadow: 0 15px 30px -10px rgba(245, 158, 11, 0.3);
}

.card-gradient-emerald {
    background: linear-gradient(135deg, #047857 0%, #10b981 100%);
    color: #ffffff;
    border: none;
    border-radius: 16px;
    box-shadow: 0 15px 30px -10px rgba(16, 185, 129, 0.3);
}

/* Metric Display */
.metric-value {
    font-size: clamp(1.25rem, 5vw, 1.65rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.25;
    word-break: break-word;
}

.metric-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--tamaymo-muted);
    font-weight: 600;
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: #ffffff;
    border-top: 1px solid var(--tamaymo-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1040;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 600;
    transition: color 0.15s ease;
    position: relative;
    padding: 6px 12px;
}

.mobile-nav-item i {
    font-size: 1.3rem;
    margin-bottom: 2px;
}

.mobile-nav-item.active {
    color: var(--tamaymo-primary);
}

.mobile-nav-item.active i {
    color: var(--tamaymo-gold);
}

.nav-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 0.65rem;
    padding: 2px 5px;
}

/* Desktop Sidebar */
.desktop-sidebar {
    background: #0b132b;
    height: 100vh;
    position: sticky;
    top: 0;
    color: #e2e8f0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    z-index: 1020;
    overflow: hidden;
}

.sidebar-brand {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 16px 12px;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-user-footer {
    margin-top: auto;
    flex-shrink: 0;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-menu-item {
    margin-bottom: 4px;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.sidebar-menu-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.sidebar-menu-link.active {
    background: var(--tamaymo-gold);
    color: #0b132b;
    font-weight: 700;
}

.sidebar-menu-link.active i {
    color: #0b132b;
}

/* Timeline Components */
.timeline-container {
    position: relative;
    padding-left: 28px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 8px;
    width: 2px;
    background: #cbd5e1;
}

.timeline-step {
    position: relative;
    margin-bottom: 24px;
}

.timeline-step:last-child {
    margin-bottom: 0;
}

.timeline-indicator {
    position: absolute;
    left: -28px;
    top: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e2e8f0;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 2px #cbd5e1;
}

.timeline-step.completed .timeline-indicator {
    background: var(--tamaymo-emerald);
    box-shadow: 0 0 0 2px var(--tamaymo-emerald);
}

.timeline-step.active .timeline-indicator {
    background: var(--tamaymo-gold);
    box-shadow: 0 0 0 2px var(--tamaymo-gold);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Modern Progress Bars */
.progress-tamaymo {
    height: 10px;
    border-radius: 999px;
    background-color: #e2e8f0;
    overflow: hidden;
}

.progress-tamaymo .progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, var(--tamaymo-gold) 0%, #10b981 100%);
    transition: width 0.6s ease;
}

/* Badges & Pills */
.badge-pill-custom {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Custom Buttons */
.btn-tamaymo-primary {
    background-color: var(--tamaymo-primary);
    color: #ffffff;
    border-radius: 10px;
    font-weight: 600;
    padding: 10px 20px;
    border: none;
    transition: all 0.2s ease;
}

.btn-tamaymo-primary:hover {
    background-color: var(--tamaymo-secondary);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-tamaymo-gold {
    background-color: var(--tamaymo-gold);
    color: #0b132b;
    border-radius: 10px;
    font-weight: 700;
    padding: 10px 20px;
    border: none;
    transition: all 0.2s ease;
}

.btn-tamaymo-gold:hover {
    background-color: var(--tamaymo-gold-dark);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Top App Header Mobile */
.mobile-app-header {
    background: #0b132b;
    color: #ffffff;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Offcanvas Drawer Custom */
.offcanvas {
    z-index: 1070 !important;
}

.offcanvas-backdrop {
    z-index: 1065 !important;
}

/* Admin Mobile Bottom Navigation Bar */
.admin-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: #0b132b;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1040;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    padding: 0 4px;
}

.admin-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 600;
    transition: all 0.15s ease;
    position: relative;
    padding: 6px 10px;
    border-radius: 10px;
    flex: 1;
    max-width: 76px;
    text-align: center;
    cursor: pointer;
    background: transparent;
    border: none;
    -webkit-tap-highlight-color: transparent;
}

.admin-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.admin-nav-item:hover {
    color: #ffffff;
}

.admin-nav-item.active {
    color: var(--tamaymo-gold);
}

.admin-nav-item.active i {
    color: var(--tamaymo-gold);
}

/* Fluid Metric Value for Mobile */
.metric-value {
    font-size: clamp(1.2rem, 4.2vw, 1.65rem);
    font-weight: 700;
    letter-spacing: -0.5px;
    word-break: break-word;
}

/* Scroll-X Helper for Horizontal Pills on Mobile */
.scroll-x-mobile {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding-bottom: 4px;
}

.scroll-x-mobile::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Responsive Table Wrapper & Touch Targets */
.table-responsive {
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
}

/* Universal Modal Responsiveness & Fixed Footer */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1055;
    overflow-x: hidden;
    overflow-y: auto;
}

.modal-dialog-scrollable {
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 1rem);
    height: calc(100% - 1rem);
    margin: 0.5rem auto;
}

.modal-dialog-scrollable .modal-content {
    display: flex;
    flex-direction: column;
    max-height: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
}

.modal-dialog-scrollable .modal-header {
    flex-shrink: 0;
    padding: 1rem 1.25rem;
}

.modal-dialog-scrollable form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.modal-dialog-scrollable form .modal-body,
.modal-dialog-scrollable .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.25rem;
    min-height: 0;
}

.modal-dialog-scrollable form .modal-footer,
.modal-dialog-scrollable .modal-footer {
    flex-shrink: 0;
    padding: 0.85rem 1.25rem;
    background-color: #f8fafc;
    border-top: 1px solid var(--tamaymo-border);
    position: relative;
    z-index: 2;
}

@media (max-width: 575.98px) {
    .modal-dialog-scrollable {
        margin: 0.5rem !important;
        max-width: calc(100vw - 1rem) !important;
        max-height: calc(100dvh - 1rem) !important;
        height: calc(100dvh - 1rem) !important;
    }

    .modal-dialog-scrollable .modal-header {
        padding: 0.85rem 1rem !important;
    }

    .modal-dialog-scrollable form .modal-body,
    .modal-dialog-scrollable .modal-body {
        padding: 1rem !important;
    }

    .modal-dialog-scrollable form .modal-footer,
    .modal-dialog-scrollable .modal-footer {
        padding: 0.75rem 1rem !important;
        display: flex;
        gap: 8px;
    }

    .modal-dialog-scrollable form .modal-footer .btn,
    .modal-dialog-scrollable .modal-footer .btn {
        flex: 1;
        padding: 9px 12px;
        font-size: 0.875rem;
    }

    .btn-tamaymo-primary,
    .btn-tamaymo-gold {
        padding: 9px 16px;
        font-size: 0.875rem;
    }

    .metric-label {
        font-size: 0.75rem;
    }
}

/* Custom Tamaymo Pagination (Bootstrap 5) */
.pagination {
    margin-bottom: 0;
    gap: 4px;
    flex-wrap: wrap;
}

.pagination .page-item .page-link {
    color: var(--tamaymo-primary);
    background-color: #ffffff;
    border: 1px solid var(--tamaymo-border);
    border-radius: 8px !important;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

.pagination .page-item .page-link:hover {
    background-color: #f1f5f9;
    color: var(--tamaymo-gold-dark);
    border-color: #cbd5e1;
}

.pagination .page-item.active .page-link {
    background-color: var(--tamaymo-gold) !important;
    border-color: var(--tamaymo-gold) !important;
    color: #0b132b !important;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.pagination .page-item.disabled .page-link {
    color: #94a3b8;
    background-color: #f8fafc;
    border-color: var(--tamaymo-border);
    cursor: not-allowed;
}

