/* ============================================================
   Applied globally on top of style.bundle.css and custom.css
   ============================================================ */

:root {
    --sg-primary: #197f7f;
    --sg-primary-strong: #146666;
    --sg-accent: #82c59b;
    --sg-text: #1f2937;
    --sg-text-muted: #4b5563;
    --sg-border: #dce5ee;
    --sg-surface: #ffffff;
    --sg-surface-soft: #f5f9fb;
    --sg-shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.06);
    --sg-shadow-md: 0 10px 24px rgba(15, 23, 42, 0.08);
    --sg-shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.12);
    --sg-radius: 12px;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--sg-text);
    background: #f3f6f9;
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(25, 127, 127, 0.18);
    color: #0f172a;
}

/* ============================================================
   Dashboard Shell
   ============================================================ */

#kt_header.header {
    background: #ffffff;
    border-bottom: 1px solid rgba(25, 127, 127, 0.1) !important;
    box-shadow: none !important;
}

#kt_header .topbar .btn-clean {
    border-radius: 999px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

#kt_header .topbar .btn-clean:hover {
    background: rgba(25, 127, 127, 0.08);
    box-shadow: var(--sg-shadow-sm);
}

#kt_header .symbol.symbol-light-success {
    background: linear-gradient(135deg, rgba(25, 127, 127, 0.18) 0%, rgba(130, 197, 155, 0.2) 100%);
}

#kt_header .symbol.symbol-light-success .symbol-label {
    color: var(--sg-primary-strong);
}

#kt_aside.aside {
    background: linear-gradient(180deg, #ffffff 0%, #f8fcfb 100%);
    border-right: 1px solid rgba(25, 127, 127, 0.12);
    box-shadow: 4px 0 18px rgba(15, 23, 42, 0.04);
}

#kt_aside .brand {
    border-bottom: 1px solid rgba(25, 127, 127, 0.1);
    background: linear-gradient(180deg, rgba(130, 197, 155, 0.09) 0%, rgba(25, 127, 127, 0.04) 100%);
}

#kt_aside .brand-logo img {
    filter: drop-shadow(0 2px 6px rgba(25, 127, 127, 0.25));
}

#kt_aside .menu-nav .menu-item > .menu-link {
    border: 1px solid transparent;
    border-radius: 10px;
}

#kt_aside .menu-nav .menu-item > .menu-link:hover {
    border-color: rgba(25, 127, 127, 0.18);
    box-shadow: var(--sg-shadow-sm);
}

#kt_aside .menu-nav .menu-item.menu-item-active > .menu-link {
    background: linear-gradient(135deg, rgba(25, 127, 127, 0.18) 0%, rgba(130, 197, 155, 0.18) 100%);
    border-color: rgba(25, 127, 127, 0.3);
    box-shadow: var(--sg-shadow-sm);
}

#kt_aside .menu-nav .menu-item > .menu-link .menu-text {
    color: #334155;
}

#kt_aside .menu-nav .menu-item.menu-item-active > .menu-link .menu-text {
    color: #0f4f4f;
}

.content {
    padding-top: 1.15rem;
}

#kt_subheader {
    background: #ffffff;
    border: 1px solid rgba(25, 127, 127, 0.12);
    border-top: 0;
    border-left: 0;
    border-right: 0;
    border-radius: 0 0 var(--sg-radius) var(--sg-radius);
    box-shadow: var(--sg-shadow-sm);
    margin: 0 0 0.75rem;
}

#kt_content .container-fluid {
    max-width: 100%;
}

#kt_footer.footer {
    border-top: 1px solid rgba(25, 127, 127, 0.16);
    background: linear-gradient(180deg, #ffffff 0%, #f6fbfa 100%);
    box-shadow: 0 -4px 14px rgba(15, 23, 42, 0.05);
}

#kt_footer .nav .nav-link {
    color: #2e4b4b;
    font-weight: 500;
}

#kt_footer .nav .nav-link:hover {
    color: var(--sg-primary);
}

/* ============================================================
   Shared Components
   ============================================================ */

.card.card-custom {
    border: 1px solid rgba(149, 169, 190, 0.25);
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow-sm);
    overflow: visible;
}

.card.card-custom > .card-header,
.card.card-custom > .card-body {
    overflow: visible;
}

.card.card-custom:hover {
    box-shadow: var(--sg-shadow-md);
}

.card.card-custom > .card-header,
.card-custom .card-header {
    background: linear-gradient(180deg, rgba(130, 197, 155, 0.1) 0%, rgba(25, 127, 127, 0.04) 100%);
    border-bottom: 1px solid rgba(130, 197, 155, 0.35);
}

.card-title,
.card-title h3,
.card-custom .card-header .card-label {
    color: #1e293b;
}

.btn {
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--sg-primary) 0%, #1a9a9a 100%) !important;
    border: none !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--sg-primary-strong) 0%, #167f7f 100%) !important;
}

.form-control,
.custom-select,
input.form-control,
select.form-control,
textarea.form-control {
    border: 1px solid var(--sg-border) !important;
    border-radius: 8px !important;
    background-color: #fff;
    color: #243447;
}

.form-control:focus,
.custom-select:focus,
input.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
    border-color: rgba(25, 127, 127, 0.62) !important;
    box-shadow: 0 0 0 3px rgba(25, 127, 127, 0.14) !important;
}

.form-group > label,
label,
.create-label {
    color: #334155;
    font-weight: 600;
}

.input-group-text {
    border: 1px solid var(--sg-border);
    background: #f8fbfd;
    color: #475569;
}

.table {
    color: #334155;
}

.table thead th {
    background: #f6fafc;
    color: #334155;
    border-bottom: 2px solid rgba(130, 197, 155, 0.34) !important;
}

.table tbody td {
    border-bottom: 1px solid #edf2f7 !important;
}

.table tbody tr:hover {
    background: rgba(25, 127, 127, 0.05) !important;
}

/* Data-heavy screens: recover horizontal space for wide tables */
.table-responsive {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.table thead th,
.table tbody td {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

.modern-dashboard-table .table thead th {
    white-space: normal !important;
}

.alert {
    border: 1px solid transparent;
    border-radius: 10px;
    box-shadow: var(--sg-shadow-sm);
}

.alert-success {
    border-color: rgba(34, 197, 94, 0.28);
}

.alert-info {
    border-color: rgba(59, 130, 246, 0.28);
}

.alert-warning {
    border-color: rgba(245, 158, 11, 0.3);
}

.alert-danger {
    border-color: rgba(239, 68, 68, 0.3);
}

.badge {
    border-radius: 999px !important;
    font-weight: 600;
}

.pagination .page-link {
    border-radius: 8px;
}

.dropdown-menu {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    box-shadow: var(--sg-shadow-md);
}

/* Wider toast notifications for long operational messages */
#toast-container > .toast {
    width: 560px !important;
    max-width: min(94vw, 560px) !important;
    padding: 14px 15px !important;
    background-image: none !important;
}

/* Fix toast message text */
#toast-container > .toast .toast-message {
    padding-left: 0 !important;
}


/* ============================================================
   Landing Pages
   ============================================================ */

body.landing-page-body {
    background:
        radial-gradient(circle at 10% -5%, rgba(25, 127, 127, 0.09) 0%, transparent 34%),
        radial-gradient(circle at 84% 0%, rgba(130, 197, 155, 0.12) 0%, transparent 28%),
        linear-gradient(180deg, #f8fbfc 0%, #f5f9fb 100%);
}

.landing-header {
    border-bottom: 1px solid rgba(25, 127, 127, 0.15);
}

.main-content-wrapper {
    padding-bottom: 1.25rem;
}

.hero-card,
.stat-card,
.about-card,
.contact-card,
.info-card,
.custom-bottom-card,
body.landing-page-body .card.card-custom {
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    box-shadow: var(--sg-shadow-sm);
}

.hero-card:hover,
.stat-card:hover,
.about-card:hover,
.contact-card:hover,
.info-card:hover,
body.landing-page-body .card.card-custom:hover {
    box-shadow: var(--sg-shadow-lg);
}

.footer.footer-background {
    background: linear-gradient(
        115deg,
        rgba(16, 94, 94, 0.96) 0%,
        rgba(29, 123, 109, 0.93) 40%,
        rgba(84, 165, 130, 0.9) 100%
    );
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer .footer-text {
    letter-spacing: 0.01em;
}

.footer.footer-background .footer-logos {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 6px 10px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
}

.footer.footer-background .footer-logos a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    min-height: auto;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.footer.footer-background .footer-logos a:hover {
    background: transparent;
}

.footer.footer-background .footer-logos img {
    height: 43px;
    width: auto;
    filter: none;
    opacity: 1;
}

/* ============================================================
   Motion and Accessibility
   ============================================================ */

@keyframes sg-fade-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

.hero-card,
.about-card,
.contact-card,
.info-card,
.stat-card {
    animation: sg-fade-up 0.42s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .card,
    .hero-card,
    .about-card,
    .contact-card,
    .info-card,
    .stat-card,
    .btn,
    .menu-link {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 991px) {
    #kt_content .container-fluid {
        max-width: 100%;
    }

    #kt_subheader {
        border-radius: 0 0 10px 10px;
        margin-top: 0;
    }

    .card,
    .card.card-custom {
        border-radius: 10px;
    }

    .footer .footer-content {
        gap: 8px;
    }
}

@media (max-width: 576px) {
    .footer.footer-background .footer-logos img {
        height: 34px;
    }
}
