/* Global UI Overhaul
   Shared responsive layer for admin, member, and frontend templates. */

:root {
    --ov-radius-sm: 10px;
    --ov-radius-md: 16px;
    --ov-radius-lg: 24px;
    --ov-shadow-soft: 0 16px 36px rgba(15, 23, 42, 0.08);
    --ov-shadow-hover: 0 24px 46px rgba(15, 23, 42, 0.14);
}

html,
body {
    overflow-x: hidden;
}

/* Shared fluid media */
img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
    height: auto;
}

/* Improve table behavior in all templates */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table-responsive,
div.dataTables_wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Inputs and controls */
input.form-control,
select.form-control,
textarea.form-control,
.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
    min-height: 42px;
    border-radius: var(--ov-radius-sm) !important;
}

.btn {
    border-radius: 12px;
    font-weight: 600;
}

/* ADMIN */
body.ui-overhaul-admin #wrapper {
    min-height: 100vh;
}

body.ui-overhaul-admin .container-fluid {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
}

body.ui-overhaul-admin .card {
    border-radius: var(--ov-radius-lg) !important;
    box-shadow: var(--ov-shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.ui-overhaul-admin .card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ov-shadow-hover);
}

/* MEMBER */
body.ui-overhaul-member {
    background: radial-gradient(circle at top left, #eff6ff 0%, #f8fafc 45%, #eef2ff 100%);
}

body.ui-overhaul-member .main-content .container-fluid {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
    padding-bottom: 2rem;
}

body.ui-overhaul-member .card,
body.ui-overhaul-member .widget {
    border-radius: var(--ov-radius-md);
    box-shadow: var(--ov-shadow-soft);
}

/* FRONTEND */
body.ui-overhaul-front {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

body.ui-overhaul-front main {
    min-height: calc(100vh - 170px);
}

body.ui-overhaul-front .container,
body.ui-overhaul-front .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

body.ui-overhaul-front .card,
body.ui-overhaul-front .pricing-item,
body.ui-overhaul-front .feature-item {
    border-radius: var(--ov-radius-md);
    box-shadow: var(--ov-shadow-soft);
}

/* Mobile and tablet tuning */
@media (max-width: 991.98px) {
    body.ui-overhaul-admin #accordionSidebar {
        width: 250px !important;
    }

    body.ui-overhaul-admin .topbar {
        height: 64px;
    }

    body.ui-overhaul-admin .container-fluid,
    body.ui-overhaul-member .container-fluid {
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    body.ui-overhaul-member .main-content {
        padding-bottom: 78px;
    }

    body.ui-overhaul-front .header-nav {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    body.ui-overhaul-front main {
        padding-bottom: 48px;
    }
}

@media (max-width: 767.98px) {
    h1,
    .h1 {
        font-size: 1.7rem;
    }

    h2,
    .h2 {
        font-size: 1.45rem;
    }

    .card-body,
    .modal-body,
    .modal-header,
    .modal-footer {
        padding: 0.9rem;
    }

    .btn,
    .form-control {
        font-size: 0.95rem;
    }

    .table th,
    .table td {
        white-space: nowrap;
        font-size: 0.88rem;
    }

    body.ui-overhaul-admin .sidebar.toggled .nav-item .collapse {
        left: 84px;
        min-width: 180px;
    }
}
