/* MGP Admin Panel Custom Styles */

:root {
    --app-theme: #1B4332 !important;
    --app-theme-rgb: 27, 67, 50 !important;
    --app-theme-color: #FFFFFF !important;
    --app-theme-color-rgb: 255, 255, 255 !important;

    --mgp-primary: #1B4332;
    --mgp-primary-hover: #122c21;
    --mgp-secondary: #2D6A4F;
    --mgp-secondary-light: #e8f5e9;
    --mgp-accent: #40916c;
    --mgp-neutral-dark: #212529;
    --mgp-border: #dee2e6;
    --mgp-bg: #f8f9fa;
    --mgp-card-bg: #ffffff;
    --mgp-text-muted: #6c757d;
    --mgp-list-hover: #f1f3f5;
}

html.dark-mode {
    --app-theme: #aeeecb !important;
    --app-theme-rgb: 174, 238, 203 !important;
    --app-theme-color: #181c20 !important;
    --app-theme-color-rgb: 24, 28, 32 !important;

    --mgp-primary: #aeeecb;
    --mgp-primary-hover: #b1f0ce;
    --mgp-secondary: #95d4b3;
    --mgp-secondary-light: #1b4332;
    --mgp-accent: #86d7ad;
    --mgp-neutral-dark: #f8f9fa;
    --mgp-border: #363c46;
    --mgp-bg: #181c20;
    --mgp-card-bg: #212837;
    --mgp-text-muted: #a0aec0;
    --mgp-list-hover: #2d3748;
}

@media (max-width:767.98px) {
    .btnsFlotandoTxt {
        display: none;
    }
}

.btnsFlotando {
    position: fixed;
    right: 40px;
    top: 80px;
    z-index: 99;
}

.brand-logo {
    padding: 0px !important;
}

.btn-primary {
    color: #fff;
    background-color: var(--app-theme);
    border-color: var(--app-theme);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8)
}

.btn-primary:hover {
    background-color: color-mix(in srgb,
            var(--app-theme) 85%,
            black);

    border-color: color-mix(in srgb,
            var(--app-theme) 85%,
            black);
}

.colorPrincipal {
    color: var(--app-theme);
}

.datepicker {
    z-index: 1001 !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--mgp-primary) !important;
}

/* MGP Component Styles */
.mgp-container {
    font-family: 'Inter', sans-serif;
    color: var(--mgp-neutral-dark);
}

/* Sub-navigation Menu & Cards styling */
.mgp-menu-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--mgp-text-muted);
    margin-bottom: 16px;
}

.mgp-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mgp-nav-item a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--mgp-text-muted);
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s ease-in-out;
}

.mgp-nav-item a i {
    margin-right: 12px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.mgp-nav-item.active a {
    background-color: var(--mgp-secondary-light);
    color: var(--mgp-secondary);
    font-weight: 600;
}

.mgp-nav-item a:hover:not(.active) {
    background-color: var(--mgp-list-hover);
    color: var(--mgp-neutral-dark);
}

/* Collapsible Section Cards */
.mgp-collapsible-card {
    background: var(--mgp-card-bg);
    border: 1px solid var(--mgp-border);
    border-radius: 12px;
    margin-top: 16px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.mgp-collapsible-header {
    padding: 14px 16px;
    background-color: var(--mgp-card-bg);
    font-weight: 600;
    color: var(--mgp-neutral-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid transparent;
    transition: background-color 0.2s;
}

.mgp-collapsible-header:hover {
    background-color: var(--mgp-list-hover);
}

.mgp-collapsible-header i.arrow-icon {
    transition: transform 0.2s;
}

.mgp-collapsible-header:not(.collapsed) i.arrow-icon {
    transform: rotate(180deg);
}

.mgp-collapsible-header:not(.collapsed) {
    border-bottom: 1px solid var(--mgp-border);
}

.mgp-collapsible-body {
    padding: 8px 0;
}

.mgp-collapsible-link {
    display: block;
    padding: 8px 24px;
    color: var(--mgp-text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s, background-color 0.2s;
}

.mgp-collapsible-link:hover {
    color: var(--mgp-secondary);
    background-color: var(--mgp-list-hover);
    text-decoration: none;
}

/* Bottom button */
.mgp-btn-edit-profile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    margin-top: 24px;
    background-color: var(--mgp-secondary);
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s;
    text-decoration: none;
}

.mgp-btn-edit-profile:hover {
    background-color: var(--mgp-primary);
    color: #ffffff !important;
    text-decoration: none;
}

.mgp-btn-edit-profile i {
    margin-right: 8px;
}

/* Right Pane Header */
.mgp-breadcrumb {
    font-size: 13px;
    color: var(--mgp-text-muted);
    margin-bottom: 16px;
}

.mgp-breadcrumb a {
    color: var(--mgp-text-muted);
    text-decoration: none;
}

.mgp-breadcrumb a:hover {
    color: var(--mgp-secondary);
}

.mgp-header-subtitle {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mgp-secondary);
    font-weight: 700;
    margin-bottom: 4px;
}

.mgp-header-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.mgp-header-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--mgp-primary);
    margin: 0;
}

.mgp-status-badge {
    background-color: #d1e7dd;
    color: #0f5132;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

html.dark-mode .mgp-status-badge {
    background-color: #0f5132;
    color: #d1e7dd;
}

.mgp-verified-text {
    font-size: 13px;
    color: var(--mgp-text-muted);
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Details Card styling */
.mgp-detail-card {
    background: var(--mgp-card-bg);
    border: 1px solid var(--mgp-border);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.01);
    overflow: hidden;
}

.mgp-card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--mgp-border);
}

.mgp-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--mgp-primary);
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mgp-btn-edit-data {
    background-color: var(--mgp-primary);
    color: var(--app-theme-color) !important;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
    text-decoration: none;
}

.mgp-btn-edit-data:hover {
    background-color: var(--mgp-primary-hover);
    color: var(--app-theme-color) !important;
    text-decoration: none;
}

.mgp-card-body {
    padding: 24px;
}

.mgp-field-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--mgp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.mgp-field-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--mgp-neutral-dark);
    margin-bottom: 24px;
}

.mgp-field-value-primary {
    color: var(--mgp-primary);
}

.mgp-field-value-highlight {
    color: var(--mgp-secondary);
}

.mgp-icon-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mgp-icon-value i {
    color: var(--mgp-text-muted);
}

/* Custom checkbox styles matching brand identity */
.form-check-input:checked {
    background-color: var(--app-theme) !important;
    border-color: var(--app-theme) !important;
}

.form-check-input:focus {
    border-color: var(--app-theme) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--app-theme-rgb), 0.25) !important;
}

/* Sidebar Redesign Overrides */
.app-sidebar {
    background-color: #012d1d !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    top: 0 !important;
    padding-top: 0 !important;
    z-index: 1020 !important;
    transition: width 0.25s ease, margin-left 0.25s ease !important;
}
.app-sidebar-content {
    background: transparent !important;
    flex: 1 !important;
    overflow-y: auto !important;
}

/* Width overrides for standard layout */
.app:not(.app-sidebar-minified) .app-sidebar {
    width: 280px !important;
}
.app:not(.app-sidebar-minified) .app-content, 
.app:not(.app-sidebar-minified) .app-header {
    margin-left: 280px !important;
}

/* Width overrides for minified layout */
.app-sidebar-minified .app-sidebar {
    width: 60px !important;
}
.app-sidebar-minified .app-content,
.app-sidebar-minified .app-header {
    margin-left: 60px !important;
}

/* Fallback icons default hidden (only shown when minified) */
.app-sidebar .menu-icon-fallback {
    display: none !important;
}
.app-sidebar-minified .app-sidebar .menu-icon-fallback {
    display: flex !important;
}

/* Hide logo text, link labels, and footer button label when minified */
.app-sidebar-minified .app-sidebar .brand-text-container,
.app-sidebar-minified .app-sidebar button.w-100 span:not(.material-symbols-outlined),
.app-sidebar-minified .app-sidebar .menu-text,
.app-sidebar-minified .app-sidebar .menu-caret,
.app-sidebar-minified .app-sidebar .menu-header {
    display: none !important;
}

/* Center logo, toggler, and bottom icon when minified */
.app-sidebar-minified .app-sidebar div[style*="border-bottom"] {
    padding: 16px 8px !important;
    justify-content: center !important;
    flex-direction: column !important;
    gap: 12px !important;
}
.app-sidebar-minified .app-sidebar .menu-toggler {
    margin: 0 auto !important;
    display: flex !important;
}
.app-sidebar-minified .app-sidebar .p-3 button {
    padding: 8px !important;
    justify-content: center !important;
}
.app-sidebar-minified .app-sidebar .menu-item {
    margin: 4px 6px !important;
}
.app-sidebar-minified .app-sidebar .menu-link {
    padding: 12px 0 !important;
    justify-content: center !important;
    gap: 0 !important;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        width: 280px !important;
        left: -280px !important;
    }
    .app-sidebar-mobile-toggled .app-sidebar {
        left: 0 !important;
    }
    .app:not(.app-sidebar-minified) .app-content, 
    .app:not(.app-sidebar-minified) .app-header,
    .app-sidebar-minified .app-content,
    .app-sidebar-minified .app-header {
        margin-left: 0 !important;
    }
}
.app-sidebar .menu {
    padding: 0 !important;
}
.app-sidebar .menu-header {
    color: rgba(255, 255, 255, 0.4) !important;
    padding: 16px 20px 8px 20px !important;
    text-transform: uppercase !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.1em !important;
}
.app-sidebar .menu-item {
    margin: 4px 12px !important;
}
.app-sidebar .menu-link {
    color: rgba(255, 255, 255, 0.7) !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}
.app-sidebar .menu-item:hover > .menu-link,
.app-sidebar .menu-item.expand > .menu-link {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    text-decoration: none !important;
}
.app-sidebar .menu-item.active > .menu-link {
    color: #ffffff !important;
    background-color: #1b4332 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}
.app-sidebar .menu-icon {
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: inherit !important;
}
.app-sidebar .menu-icon i,
.app-sidebar .menu-icon span {
    font-size: 18px !important;
}
.app-sidebar .menu-caret {
    margin-left: auto !important;
}
.app-sidebar .menu-submenu {
    background: rgba(0, 0, 0, 0.15) !important;
    padding: 4px 0 !important;
    border-radius: 8px !important;
    margin-top: 4px !important;
    border-left: 2px solid rgba(255, 255, 255, 0.1) !important;
}

/* Dashboard Styles & Animations */
.kpi-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08) !important;
}