/* ========================================
   InsurePro - Premium Custom Styles
   ======================================== */

:root {
    --primary-color: #2C3E50;
    --primary-dark: #1a252f;
    --primary-light: #34495E;
    --accent-color: #3498DB;
    --accent-hover: #2980B9;
    --success-color: #27AE60;
    --warning-color: #F39C12;
    --danger-color: #E74C3C;
    --info-color: #16A085;
    --light-bg: #F8F9FA;
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Typography Enhancements
   ======================================== */

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #2C3E50;
    background-color: #F5F7FA;
    font-size: 15px;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

/* ========================================
   Page Content Wrapper
   ======================================== */

.page-content {
    background: linear-gradient(135deg, #F5F7FA 0%, #E8ECEF 100%);
    min-height: 100vh;
    padding: 2rem !important;
}

.main-wrapper {
    width: 100%;
    max-width: none !important;
    padding: 0 !important;
}

/* Page Header */
.page-header {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid #E8ECEF;
}

.page-header .navbar {
    padding: 0.75rem 2rem;
}

/* ========================================
   Enhanced Cards
   ======================================== */

.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    overflow: hidden;
    background: #ffffff;
    margin-bottom: 1.5rem;
}

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

.card-body {
    padding: 1.75rem;
}

.card-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #7F8C8D;
    margin-bottom: 1rem;
}

/* ========================================
   Stat Widgets - Premium Design
   ======================================== */

.stat-widget {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-left: 4px solid var(--accent-color);
}

.stat-widget .card-body {
    padding: 2rem;
}

.stat-widget h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0.5rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-widget p {
    color: #7F8C8D;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.stat-widget .progress {
    height: 6px;
    border-radius: 10px;
    background-color: #E8ECEF;
    overflow: hidden;
}

.stat-widget .progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* ========================================
   Sidebar Enhancements - Premium Style
   ======================================== */

.page-sidebar {
    background: linear-gradient(180deg, #1a252f 0%, #0f1419 100%);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    position: relative;
}

.page-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, rgba(52, 152, 219, 0.3) 0%, rgba(52, 152, 219, 0) 100%);
}

.accordion-menu {
    padding: 1rem 0;
}

.accordion-menu li {
    position: relative;
    margin-bottom: 0.25rem;
}

.accordion-menu li a {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    border-radius: 10px;
    margin: 0 1rem;
    padding: 0.875rem 1.25rem;
    font-weight: 500;
    font-size: 0.938rem;
    color: rgba(255, 255, 255, 0.75);
    position: relative;
    overflow: hidden;
}

.accordion-menu li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.25) 0%, rgba(52, 152, 219, 0.05) 100%);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.accordion-menu li a i,
.accordion-menu li a [data-feather] {
    width: 20px;
    height: 20px;
    stroke-width: 2.5px;
    transition: var(--transition);
    z-index: 1;
}

.accordion-menu li a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(6px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.accordion-menu li a:hover::before {
    width: 100%;
}

.accordion-menu li a:hover i,
.accordion-menu li a:hover [data-feather] {
    transform: scale(1.1);
    stroke: var(--accent-color);
}

.accordion-menu li.active-page a {
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.25) 0%, rgba(52, 152, 219, 0.08) 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.2);
    border-left: 4px solid var(--accent-color);
    padding-left: calc(1.25rem - 4px);
}

.accordion-menu li.active-page a::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-color);
}

.accordion-menu li.active-page a i,
.accordion-menu li.active-page a [data-feather] {
    stroke: var(--accent-color);
    filter: drop-shadow(0 0 4px rgba(52, 152, 219, 0.5));
}

.sidebar-title {
    font-size: 0.688rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
    padding: 2rem 1.75rem 0.75rem;
    margin-top: 1rem;
    position: relative;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.75rem;
    right: 1.75rem;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
}

.sidebar-title:first-child {
    margin-top: 0;
    padding-top: 1.5rem;
}

/* Sidebar scrollbar styling */
.page-sidebar::-webkit-scrollbar {
    width: 6px;
}

.page-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.page-sidebar::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.3);
    border-radius: 10px;
}

.page-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 152, 219, 0.5);
}

/* ========================================
   Header & Navigation
   ======================================== */

.page-header {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #E8ECEF;
}

.page-header .navbar {
    padding: 1rem 1.5rem;
}

.logo-into img {
    transition: var(--transition);
}

.logo-into img:hover {
    transform: scale(1.05);
}

/* ========================================
   Buttons - Premium Style
   ======================================== */

.btn {
    border-radius: 8px;
    padding: 0.625rem 1.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.3px;
    transition: var(--transition);
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, #1F6BA8 100%);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #229954 100%);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #C0392B 100%);
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #138D75 100%);
}

.cta-button {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

/* ========================================
   Tables - Modern Design
   ======================================== */

.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: linear-gradient(135deg, #F8F9FA 0%, #E8ECEF 100%);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.813rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    padding: 1.25rem 1rem;
}

.table tbody tr {
    transition: var(--transition);
    border-bottom: 1px solid #E8ECEF;
}

.table tbody tr:hover {
    background-color: #F8F9FA;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    color: #34495E;
    font-size: 0.875rem;
}

.table tbody td:first-child {
    font-weight: 600;
    color: var(--primary-color);
}

/* DataTables Enhancements */
.dataTables_wrapper .dataTables_filter input {
    border: 2px solid #E8ECEF;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

.dataTables_wrapper .dataTables_length select {
    border: 2px solid #E8ECEF;
    border-radius: 8px;
    padding: 0.5rem 2rem 0.5rem 1rem;
    transition: var(--transition);
}

/* ========================================
   Forms - Modern & Clean
   ======================================== */

.form-control, .form-select {
    border: 2px solid #E8ECEF;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.938rem;
    transition: var(--transition);
    background-color: #ffffff;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-floating > label {
    color: #7F8C8D;
}

/* ========================================
   Stat Widgets - Dashboard Cards
   ======================================== */

.stat-widget {
    background: linear-gradient(135deg, #ffffff 0%, #F8F9FA 100%);
    border-left: 4px solid var(--accent-color);
    transition: var(--transition);
}

.stat-widget:hover {
    border-left-width: 6px;
    transform: translateX(4px);
}

.stat-widget .card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #7F8C8D;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-widget h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stat-widget p {
    font-size: 0.813rem;
    color: #95A5A6;
    margin-bottom: 1rem;
}

.stat-widget .progress {
    height: 6px;
    border-radius: 10px;
    background-color: #E8ECEF;
}

.stat-widget .progress-bar {
    border-radius: 10px;
    background: linear-gradient(90deg, var(--success-color) 0%, #229954 100%);
}

/* ========================================
   Badges & Labels
   ======================================== */

.badge {
    padding: 0.375rem 0.75rem;
    font-weight: 600;
    font-size: 0.75rem;
    border-radius: 6px;
    letter-spacing: 0.3px;
}

.badge-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #229954 100%);
}

.badge-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #D68910 100%);
}

.badge-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #C0392B 100%);
}

.badge-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #138D75 100%);
}

.badge-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
}

/* ========================================
   Page Title & Breadcrumbs
   ======================================== */

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 0.938rem;
    color: #7F8C8D;
    margin-bottom: 2rem;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item {
    font-size: 0.875rem;
    color: #7F8C8D;
}

.breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #BDC3C7;
    font-size: 1.25rem;
}

/* ========================================
   Modals
   ======================================== */

.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #F8F9FA 0%, #E8ECEF 100%);
    border-bottom: 2px solid #E8ECEF;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 700;
    color: var(--primary-color);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 2px solid #E8ECEF;
    padding: 1.5rem;
}

/* ========================================
   Alerts
   ======================================== */

.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    border-left: 4px solid;
}

.alert-success {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1) 0%, rgba(34, 153, 84, 0.05) 100%);
    border-left-color: var(--success-color);
    color: #1E8449;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.1) 0%, rgba(214, 137, 16, 0.05) 100%);
    border-left-color: var(--warning-color);
    color: #9A7D0A;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(192, 57, 43, 0.05) 100%);
    border-left-color: var(--danger-color);
    color: #A93226;
}

.alert-info {
    background: linear-gradient(135deg, rgba(22, 160, 133, 0.1) 0%, rgba(19, 141, 117, 0.05) 100%);
    border-left-color: var(--info-color);
    color: #117A65;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table tbody td {
    padding: 1.25rem 1rem;
    vertical-align: middle;
    border: none;
}

.group-table-head > tr > th, 
.group-details-table-head > tr > th, 
.group-member-details > tr > th {
    padding: 20px 10px !important;
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 1199px) {
    .page-content {
        padding: 1.5rem !important;
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 1rem !important;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .page-subtitle {
        font-size: 0.875rem;
    }
    
    .stat-widget h2 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
}

/* ========================================
   Action Buttons in Tables
   ======================================== */

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.813rem;
    border-radius: 6px;
}

.btn-sm i, .btn-sm [data-feather] {
    width: 14px;
    height: 14px;
}

/* ========================================
   Page Sidebar Enhancements
   ======================================== */

.page-sidebar {
    background: linear-gradient(180deg, #2C3E50 0%, #1a252f 100%) !important;
}

/* Ensure proper layout */
.page-container {
    display: flex;
}

.groups-actions {
    float: right;
}

/* ========================================
   Badges & Labels
   ======================================== */

.badge {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
}

.bg-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #229954 100%) !important;
}

.bg-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #C0392B 100%) !important;
}

.bg-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #138D75 100%) !important;
}

.bg-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #D68910 100%) !important;
}

.bg-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%) !important;
}

/* ========================================
   Forms - Elegant Design
   ======================================== */

.form-control, .form-select {
    border: 2px solid #E8ECEF;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: var(--transition);
    font-size: 0.938rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

.form-floating > label {
    color: #7F8C8D;
    font-weight: 500;
}

/* ========================================
   Dropdown Menus
   ======================================== */

.dropdown-menu {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 6px;
    padding: 0.625rem 1rem;
    transition: var(--transition);
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: #F8F9FA;
    color: var(--accent-color);
    transform: translateX(4px);
}

/* ========================================
   Page Content
   ======================================== */

.page-content {
    background-color: #F5F7FA;
    min-height: calc(100vh - 80px);
    padding: 2rem;
}

.main-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

/* ========================================
   Loading Spinner
   ======================================== */

.loader {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.spinner-grow {
    width: 3rem;
    height: 3rem;
}

/* ========================================
   Authentication Pages
   ======================================== */

.login-box-container {
    border: none;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.authent-logo {
    text-align: center;
    margin-bottom: 2rem;
    padding-top: 1rem;
}

.authent-text {
    text-align: center;
    margin-bottom: 2rem;
}

.authent-text p:first-child {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.authent-text p:last-child {
    color: #7F8C8D;
    font-size: 0.938rem;
}

.authent-reg {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E8ECEF;
}

.authent-reg a {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.authent-reg a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 768px) {
    .page-content {
        padding: 1rem;
    }
    
    .stat-widget h2 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1.25rem;
    }
}

/* ========================================
   Utility Classes
   ======================================== */

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: var(--card-shadow) !important;
}

.shadow-hover:hover {
    box-shadow: var(--card-shadow-hover) !important;
}

.rounded-lg {
    border-radius: var(--border-radius) !important;
}

.transition-all {
    transition: var(--transition);
}
