/* ==========================================================================
   SSO IWIMA Custom Design System
   Modern, Clean, Vibrant & Consistent UI Framework Overrides
   ========================================================================== */

:root {
    --sso-primary: #0d6efd;
    --sso-primary-gradient: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --sso-accent-gradient: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    --sso-bg-soft: #f8f9fa;
    --sso-card-radius: 0.85rem;
    --sso-card-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    --sso-hover-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    --sso-transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Global Aesthetics & Background */
body.sb-nav-fixed {
    background-color: #f4f6f9;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333333;
}

/* Navbar Top Overrides */
.sb-topnav.navbar-dark.bg-primary {
    background: var(--sso-primary-gradient) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sb-topnav .navbar-brand {
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 1.15rem;
    color: #ffffff !important;
}

/* Sidebar Overrides */
.sb-sidenav-light {
    background-color: #ffffff !important;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.sb-sidenav-light .sb-sidenav-menu .nav-link {
    color: #495057;
    font-weight: 500;
    border-radius: 0.5rem;
    margin: 0.15rem 0.75rem;
    padding: 0.65rem 1rem;
    transition: var(--sso-transition);
}

.sb-sidenav-light .sb-sidenav-menu .nav-link:hover {
    color: var(--sso-primary);
    background-color: rgba(13, 110, 253, 0.08);
}

.sb-sidenav-light .sb-sidenav-menu .nav-link.active {
    color: var(--sso-primary) !important;
    background-color: rgba(13, 110, 253, 0.12) !important;
    font-weight: 600;
}

.sb-sidenav-light .sb-sidenav-menu .nav-link .sb-nav-link-icon {
    color: #6c757d;
    transition: var(--sso-transition);
}

.sb-sidenav-light .sb-sidenav-menu .nav-link:hover .sb-nav-link-icon,
.sb-sidenav-light .sb-sidenav-menu .nav-link.active .sb-nav-link-icon {
    color: var(--sso-primary);
}

.sb-sidenav-footer {
    background-color: #f8f9fa !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 1rem !important;
}

/* Hero / Welcome Banner */
.welcome-banner {
    background: var(--sso-primary-gradient);
    color: #ffffff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 22px rgba(30, 60, 114, 0.18);
    position: relative;
    overflow: hidden;
}

.welcome-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

/* Stat & Content Cards */
.stat-card {
    border: none;
    border-radius: var(--sso-card-radius);
    transition: var(--sso-transition);
    box-shadow: var(--sso-card-shadow);
    background: #ffffff;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sso-hover-shadow);
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--sso-card-radius);
    transition: var(--sso-transition);
    background: #ffffff;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--sso-hover-shadow);
    border-color: var(--sso-primary);
}

/* Generic Bootstrap Cards Override */
.card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--sso-card-radius);
    box-shadow: var(--sso-card-shadow);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-weight: 600;
}

/* Login Page Styling */
.login-page-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    border: none !important;
    border-radius: 1.25rem !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25) !important;
    overflow: hidden;
    background: #ffffff;
}

.login-card .card-header-brand {
    background: var(--sso-primary-gradient);
    color: #ffffff;
    padding: 2.25rem 1.5rem 1.5rem;
    text-align: center;
}

.brand-icon-box {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.brand-icon-box i {
    font-size: 1.85rem !important;
    color: #ffffff !important;
    line-height: 1 !important;
    display: inline-block !important;
}

/* Buttons & Inputs */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: var(--sso-transition);
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}

.form-control, .form-select {
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    padding: 0.6rem 0.85rem;
    transition: var(--sso-transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--sso-primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

/* Tables & GridViews */
.table {
    vertical-align: middle;
}

.table th {
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
    border-bottom-width: 1px;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.03);
}

/* Breadcrumbs */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1.25rem;
}

.breadcrumb-item a {
    color: var(--sso-primary);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #6c757d;
    font-weight: 500;
}

/* Manage Module GridView & Tables Overrides */
.grid-view {
    background: #ffffff;
    border-radius: var(--sso-card-radius);
    padding: 1.25rem;
    box-shadow: var(--sso-card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}

.grid-view .table {
    margin-bottom: 0;
    border-color: rgba(0, 0, 0, 0.06);
}

.grid-view th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.85rem 0.75rem;
    border-bottom: 2px solid #dee2e6;
}

.grid-view td {
    padding: 0.85rem 0.75rem;
    vertical-align: middle;
}

.grid-view .pagination {
    margin-top: 1.25rem;
    margin-bottom: 0;
    justify-content: flex-end;
}

.grid-view .pagination .page-item .page-link {
    border-radius: 0.4rem;
    margin: 0 2px;
    color: var(--sso-primary);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.grid-view .pagination .page-item.active .page-link {
    background-color: var(--sso-primary);
    border-color: var(--sso-primary);
    color: #ffffff;
}

/* ActionColumn Links & Buttons */
.grid-view a[data-method],
.grid-view a[title="View"],
.grid-view a[title="Update"],
.grid-view a[title="Delete"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 0.4rem;
    margin: 0 2px;
    transition: var(--sso-transition);
    background-color: #f8f9fa;
    color: #495057;
    text-decoration: none;
}

.grid-view a[title="View"]:hover {
    background-color: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
}

.grid-view a[title="Update"]:hover {
    background-color: rgba(255, 193, 7, 0.2);
    color: #856404;
}

.grid-view a[title="Delete"]:hover {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

/* DetailView Override */
.detail-view {
    background: #ffffff;
    border-radius: var(--sso-card-radius);
    overflow: hidden;
    box-shadow: var(--sso-card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.detail-view th {
    width: 25%;
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

/* Page Header Headings in Manage Module */
.manage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.manage-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin: 0;
}

