/* ============================================
   Global UI Consistency Fixes
   Argon Dashboard 3 - Patih Archery Indonesia
   ============================================ */

/* ===================
   0. Auth Pages - Light Theme Consistency
   =================== */

/* Ensure auth pages (login, forgot-password) use light background */
body {
    background-color: #f8f9fa !important;
}

/* Override any dark backgrounds */
.min-height-300 {
    background: linear-gradient(310deg, #7928CA 0%, #FF0080 100%) !important;
}

/* Auth cards - clean white */
.card {
    background-color: #fff !important;
    color: #344767 !important;
}

/* Form labels on light background */
.form-label {
    color: #344767 !important;
}

/* Form controls on light background */
.form-control {
    background-color: #fff !important;
    border-color: #d2d6da !important;
    color: #495057 !important;
}

.form-control:focus {
    background-color: #fff !important;
    border-color: #5e72e4 !important;
    color: #495057 !important;
}

/* Password toggle icon for light theme */
.cursor-pointer {
    cursor: pointer;
}

/* ===================
   1. Typography & Font Sizes (Smaller)
   =================== */

/* Body & base font size reduction */
body {
    font-size: 0.813rem !important;
    /* 13px instead of 14px */
}

/* Headings - reduce by 10% */
h1 {
    font-size: 2.0rem !important;
}

h2 {
    font-size: 1.75rem !important;
}

h3 {
    font-size: 1.5rem !important;
}

h4 {
    font-size: 1.25rem !important;
}

h5 {
    font-size: 1.0rem !important;
}

h6 {
    font-size: 0.875rem !important;
}

/* Small text */
small,
.small {
    font-size: 0.75rem !important;
}

.text-xs {
    font-size: 0.6875rem !important;
}

.text-sm {
    font-size: 0.75rem !important;
}

/* Labels */
label,
.form-label {
    font-size: 0.75rem !important;
    /* 12px */
}

/* ===================
   2. Color Contrast Fixes
   =================== */

/* Improve password toggle icon visibility */
.password-toggle {
    color: rgba(255, 255, 255, 0.8) !important;
}

.password-toggle:hover {
    color: rgba(255, 255, 255, 1) !important;
}

/* Login page subtitle - better contrast */
.login-subtitle {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Ensure form labels have good contrast */
.form-label-custom {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Text muted - better visibility */
.text-muted {
    color: #8898aa !important;
}

/* Breadcrumb text */
.breadcrumb-item {
    font-size: 0.75rem !important;
}

/* ===================
   3. Button Sizing (More Proportional)
   =================== */

.btn {
    padding: 0.5rem 1rem !important;
    font-size: 0.813rem !important;
    /* 13px */
    font-weight: 600 !important;
}

.btn-sm {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.75rem !important;
    /* 12px */
}

.btn-lg {
    padding: 0.75rem 1.5rem !important;
    font-size: 0.938rem !important;
    /* 15px */
}

/* Icon buttons */
.btn-icon-only {
    padding: 0.5rem !important;
}

/* ===================
   4. Input/Textbox Sizing
   =================== */

.form-control {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.813rem !important;
    /* 13px */
    height: auto !important;
    min-height: 38px;
}

.form-control-sm {
    padding: 0.375rem 0.625rem !important;
    font-size: 0.75rem !important;
    min-height: 32px;
}

.form-control-lg {
    padding: 0.625rem 1rem !important;
    font-size: 0.938rem !important;
    min-height: 46px;
}

/* ===================
   5. Select/Combo Sizing
   =================== */

.form-select {
    padding: 0.5rem 2.25rem 0.5rem 0.75rem !important;
    font-size: 0.813rem !important;
    height: auto !important;
    min-height: 38px;
}

.form-select-sm {
    padding: 0.375rem 2rem 0.375rem 0.625rem !important;
    font-size: 0.75rem !important;
    min-height: 32px;
}

/* ===================
   6. Padding Consistency
   =================== */

/* Main content padding */
.container-fluid {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

/* Card padding */
.card-body {
    padding: 1.25rem !important;
}

.card-header {
    padding: 1rem 1.25rem !important;
}

.card-footer {
    padding: 1rem 1.25rem !important;
}

/* Modal padding */
.modal-body {
    padding: 1.25rem !important;
}

.modal-header {
    padding: 1rem 1.25rem !important;
}

.modal-footer {
    padding: 1rem 1.25rem !important;
}

/* ===================
   7. Table Styling
   =================== */

.table {
    font-size: 0.813rem !important;
}

.table th {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    padding: 0.75rem !important;
}

.table td {
    padding: 0.75rem !important;
}

/* Table responsive - ensure horizontal scroll works on mobile */
.table-responsive {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    -ms-overflow-style: -ms-autohiding-scrollbar !important;
    touch-action: pan-x pan-y !important;
}

/* Ensure tables inside table-responsive don't collapse */
.table-responsive>.table {
    min-width: 600px;
    margin-bottom: 0;
}

/* Remove perfect-scrollbar styling from table-responsive */
.table-responsive.ps {
    overflow: auto !important;
}

.table-responsive.ps--active-x>.ps__rail-x,
.table-responsive.ps--active-y>.ps__rail-y {
    display: none !important;
}

/* Card body should not block horizontal scroll */
.card-body {
    overflow-x: visible !important;
    touch-action: auto !important;
}

/* Make sure card doesn't hide overflow */
.card {
    overflow: visible !important;
    touch-action: auto !important;
}

/* ===================
   8. Navbar Fixes
   =================== */

/* Ensure navbar stays on top */
.navbar-main {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1030 !important;
}

/* Ensure main content doesn't overlap with navbar */
.main-content {
    padding-top: 1rem !important;
    /* Reduced from 4rem since navbar removed */
}

/* When sidebar exists, adjust main content to avoid overlap */
.g-sidenav-show .main-content {
    margin-left: 17.625rem !important;
    /* Match Argon sidebar width (250px) */
    transition: all 0.2s ease-in-out;
}

/* Mobile: no sidebar offset */
@media (max-width: 1199.98px) {
    .g-sidenav-show .main-content {
        margin-left: 0 !important;
    }
}

/* ===================
   9. Sidebar Adjustments
   =================== */

.sidenav {
    z-index: 1020 !important;
}

.sidenav .nav-link {
    font-size: 0.813rem !important;
    padding: 0.65rem 1rem !important;
}

.sidenav h6 {
    font-size: 0.75rem !important;
}

/* Sidebar user info */
.sidenav-footer {
    font-size: 0.75rem !important;
}

/* ===================
   10. Badge & Alert Sizing
   =================== */

.badge {
    font-size: 0.75rem !important;
    padding: 0.35rem 0.65rem !important;
}

.alert {
    font-size: 0.813rem !important;
    padding: 0.75rem 1rem !important;
}

/* ===================
   11. Responsive Adjustments
   =================== */

@media (max-width: 1199.98px) {
    .g-sidenav-show .main-content {
        margin-left: 0;
    }
}

@media (max-width: 767.98px) {
    body {
        font-size: 0.75rem !important;
    }

    .btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.75rem !important;
    }

    .form-control,
    .form-select {
        font-size: 0.75rem !important;
    }

    /* Mobile horizontal scroll fixes */
    .container-fluid {
        overflow-x: visible !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .main-content {
        overflow-x: visible !important;
    }

    /* Ensure row doesn't block scroll */
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .col-12,
    [class*="col-"] {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    /* Table on mobile - force scroll */
    .table-responsive {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        overflow-x: auto !important;
    }

    .table-responsive>.table {
        min-width: 500px !important;
    }

    /* Card header flex wrap on mobile */
    .card-header {
        flex-wrap: wrap !important;
    }

    .card-header .d-flex {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }
}

/* ===================
   12. Fix Specific Components
   =================== */

/* Stats cards numbers */
.numbers h5 {
    font-size: 1.5rem !important;
}

.numbers p {
    font-size: 0.75rem !important;
}

/* Icons in cards */
.icon-shape {
    width: 48px !important;
    height: 48px !important;
}

.icon-shape i {
    font-size: 1.25rem !important;
}

/* Pagination */
.pagination {
    font-size: 0.813rem !important;
}

/* Dropdown menus */
.dropdown-menu {
    font-size: 0.813rem !important;
}

.dropdown-item {
    padding: 0.5rem 1rem !important;
}

/* ===================
   13. Print Optimization
   =================== */

@media print {

    .sidenav,
    .navbar-main,
    .btn,
    .fixed-plugin {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
}