/* Modern Blue Theme for HMS - Common Stylesheet */

/* ===========================================
   Global Styles
   =========================================== */
body {
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 50%, #f7f7ff 100%);
    background-attachment: fixed;
}

.main-content {
    background: transparent;
    padding: 20px 10px !important;
}

.app-content {
    padding-left: 10px !important;
}

.wrap-content.container {
    padding: 20px 25px !important;
}

.container-fullw.bg-white {
    background: transparent !important;
    padding: 20px 0;
    margin: 0 10px;
}

/* ===========================================
   Sidebar Styles
   =========================================== */
.sidebar.app-aside {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
    border-right: 1px solid rgba(37, 99, 235, 0.2);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    margin-right: 15px;
}

.sidebar .navbar-title {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    padding: 20px 15px;
    margin: 0;
    border-bottom: 2px solid rgba(37, 99, 235, 0.3);
}

.sidebar .navbar-title span {
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-navigation-menu {
    padding: 10px 0;
}

.main-navigation-menu > li {
    margin: 5px 10px;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.main-navigation-menu > li > a {
    color: #cbd5e1 !important;
    padding: 12px 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: block;
}

.main-navigation-menu > li > a:hover {
    background: rgba(37, 99, 235, 0.15) !important;
    color: #60a5fa !important;
    transform: translateX(5px);
}

.main-navigation-menu > li.active > a,
.main-navigation-menu > li > a.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2) 0%, rgba(37, 99, 235, 0.1) 100%) !important;
    color: #60a5fa !important;
    border-left: 4px solid #2563eb;
    font-weight: 600;
}

.main-navigation-menu .item-media i {
    color: #94a3b8;
    font-size: 18px;
    width: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.main-navigation-menu > li:hover .item-media i,
.main-navigation-menu > li.active .item-media i {
    color: #60a5fa;
    transform: scale(1.1);
}

.main-navigation-menu .item-inner .title {
    color: inherit;
    font-weight: 500;
    font-size: 14px;
}

.main-navigation-menu .icon-arrow {
    color: #64748b;
    transition: all 0.3s ease;
}

.main-navigation-menu > li:hover .icon-arrow,
.main-navigation-menu > li.active .icon-arrow {
    color: #60a5fa;
}

/* Sub-menu Styles */
.main-navigation-menu .sub-menu {
    background: rgba(15, 23, 42, 0.5);
    border-left: 3px solid rgba(37, 99, 235, 0.3);
    margin-left: 20px;
    border-radius: 8px;
    padding: 5px 0;
    margin-top: 5px;
}

.main-navigation-menu .sub-menu li {
    margin: 2px 0;
}

.main-navigation-menu .sub-menu li a {
    color: #94a3b8 !important;
    padding: 10px 20px;
    display: block;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 0 5px;
}

.main-navigation-menu .sub-menu li a:hover {
    background: rgba(37, 99, 235, 0.2) !important;
    color: #60a5fa !important;
    transform: translateX(5px);
}

/* ===========================================
   Header Styles
   =========================================== */
.navbar-default {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border-bottom: 2px solid rgba(37, 99, 235, 0.1);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.1);
}

.navbar-brand h2 {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 24px;
    margin: 0;
    padding: 0 !important;
}

.navbar-right h2 {
    color: #1f2937;
    font-weight: 700;
    font-size: 18px;
    margin: 0;
}

.current-user .dropdown-toggle {
    color: #1f2937 !important;
    padding: 10px 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.current-user .dropdown-toggle:hover {
    background: rgba(37, 99, 235, 0.1);
}

.current-user .username {
    color: #1f2937;
    font-weight: 600;
}

.current-user img {
    border-radius: 50%;
    border: 2px solid rgba(37, 99, 235, 0.2);
    transition: all 0.3s ease;
}

.current-user:hover img {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.dropdown-menu.dropdown-dark {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(37, 99, 235, 0.15);
    padding: 10px 0;
    margin-top: 10px;
}

.dropdown-menu.dropdown-dark li a {
    color: #1f2937;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.dropdown-menu.dropdown-dark li a:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
    color: #2563eb;
    padding-left: 25px;
}

/* ===========================================
   Panel/Card Styles
   =========================================== */
.panel-white {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border-radius: 20px !important;
    border: 1px solid rgba(37, 99, 235, 0.1) !important;
    box-shadow: 0 10px 40px rgba(37, 99, 235, 0.15), 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.4s ease;
    overflow: hidden;
    position: relative;
}

.panel-white::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.panel-white:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 50px rgba(37, 99, 235, 0.25), 0 8px 30px rgba(0, 0, 0, 0.15) !important;
}

.panel-white:hover::before {
    opacity: 1;
}

.panel-body {
    padding: 30px 20px !important;
}

.fa-stack {
    margin-bottom: 20px;
}

.fa-stack .fa-square {
    color: #2563eb !important;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%) !important;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.panel-white:hover .fa-stack .fa-square {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.fa-stack .fa-inverse {
    color: #ffffff !important;
}

.StepTitle {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin-bottom: 15px !important;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.panel-body .links a,
.panel-body .cl-effect-1 a {
    color: #2563eb !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    display: inline-block;
}

.panel-body .links a:hover,
.panel-body .cl-effect-1 a:hover {
    color: #1d4ed8 !important;
    transform: translateX(5px);
}

/* ===========================================
   Page Title Styles
   =========================================== */
.mainTitle {
    font-size: 2rem !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

#page-title {
    background: transparent;
    padding: 20px 0 10px 0;
    margin-bottom: 25px;
    margin-top: 10px;
}

.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb li {
    color: #64748b;
}

.breadcrumb li.active {
    color: #2563eb;
    font-weight: 600;
}

/* ===========================================
   Form Styles
   =========================================== */
/* Form Labels */
label,
.form-group label,
.control-label {
    color: #1f2937 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    margin-bottom: 8px !important;
    display: block !important;
}

/* Form Controls - Inputs, Textareas, Selects */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
textarea,
select {
    border: 2px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 12px 15px !important;
    transition: all 0.3s ease !important;
    background-color: #ffffff !important;
    color: #1f2937 !important;
    font-size: 14px !important;
    width: 100% !important;
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), 0 4px 12px rgba(37, 99, 235, 0.1) !important;
    outline: none !important;
    background-color: #ffffff !important;
    color: #1f2937 !important;
}

/* Textarea specific */
textarea.form-control {
    min-height: 120px !important;
    resize: vertical !important;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px !important;
}

/* Buttons - Ensure visibility */
.btn,
button {
    font-weight: 600 !important;
    padding: 12px 30px !important;
    border-radius: 10px !important;
    transition: all 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
    display: inline-block !important;
    text-align: center !important;
    text-decoration: none !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.btn-primary,
button.btn-primary,
input[type="submit"].btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 12px 30px !important;
    border-radius: 10px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3) !important;
    text-shadow: none !important;
}

.btn-primary:hover,
button.btn-primary:hover,
input[type="submit"].btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 50%, #1e3a8a 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 25px rgba(37, 99, 235, 0.5) !important;
    color: #ffffff !important;
}

.btn-primary:focus,
button.btn-primary:focus,
input[type="submit"].btn-primary:focus {
    color: #ffffff !important;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%) !important;
}

.btn-success,
button.btn-success {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%) !important;
    border: none !important;
    color: #ffffff !important;
}

.btn-success:hover,
button.btn-success:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 50%, #1e3a8a 100%) !important;
    color: #ffffff !important;
}

.btn-info,
button.btn-info {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%) !important;
    border: none !important;
    color: #ffffff !important;
}

.btn-info:hover,
button.btn-info:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 50%, #1e3a8a 100%) !important;
    color: #ffffff !important;
}

/* Form wrapper */
.forms-sample,
form {
    background: transparent !important;
}

/* Rich text editor content */
.nicEdit-main,
.nicEdit-panel {
    background-color: #ffffff !important;
    color: #1f2937 !important;
}

.nicEdit-main {
    border: 2px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 12px 15px !important;
    min-height: 120px !important;
}

/* Select2 dropdowns */
.select2-container .select2-selection--single {
    border: 2px solid #e5e7eb !important;
    border-radius: 10px !important;
    height: auto !important;
    padding: 8px 12px !important;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    color: #1f2937 !important;
    line-height: 28px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
}

/* Additional button classes */
.btn-default,
button.btn-default {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
    color: #ffffff !important;
    border: none !important;
}

.btn-default:hover,
button.btn-default:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%) !important;
    color: #ffffff !important;
}

.btn-danger,
button.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    border: none !important;
}

.btn-danger:hover,
button.btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%) !important;
    color: #ffffff !important;
}

.btn-warning,
button.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
    border: none !important;
}

.btn-warning:hover,
button.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    color: #ffffff !important;
}

/* Ensure all text in forms is visible */
.form-control option {
    color: #1f2937 !important;
    background-color: #ffffff !important;
}

/* Input groups */
.input-group .form-control {
    color: #1f2937 !important;
}

.input-group-addon {
    background-color: #f3f4f6 !important;
    border: 2px solid #e5e7eb !important;
    color: #1f2937 !important;
}

/* Help text */
.help-block,
.form-text {
    color: #64748b !important;
    font-size: 13px !important;
}

/* Required field indicators */
.required,
.required-field {
    color: #dc2626 !important;
}

/* Button size variants */
.btn-xs,
button.btn-xs {
    padding: 6px 12px !important;
    font-size: 12px !important;
}

.btn-sm,
button.btn-sm {
    padding: 8px 16px !important;
    font-size: 13px !important;
}

.btn-lg,
button.btn-lg {
    padding: 14px 35px !important;
    font-size: 16px !important;
}

/* Button style variants */
.btn-transparent,
button.btn-transparent {
    background: transparent !important;
    border: 1px solid #e5e7eb !important;
    color: #2563eb !important;
}

.btn-transparent:hover,
button.btn-transparent:hover {
    background: rgba(37, 99, 235, 0.1) !important;
    border-color: #2563eb !important;
    color: #1d4ed8 !important;
}

.btn-o,
button.btn-o {
    background: transparent !important;
    border: 2px solid #2563eb !important;
    color: #2563eb !important;
}

.btn-o:hover,
button.btn-o:hover {
    background: #2563eb !important;
    color: #ffffff !important;
}

/* Ensure button text is always visible */
.btn *,
button * {
    color: inherit !important;
}

.btn i,
button i {
    color: inherit !important;
}

/* Fix for buttons with icons */
.btn .fa,
button .fa,
.btn .fa-white,
button .fa-white {
    color: inherit !important;
}

.btn-transparent .fa-white,
button.btn-transparent .fa-white {
    color: #dc2626 !important;
}

/* Form fieldset */
fieldset {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 25px !important;
    margin: 20px 0 !important;
}

fieldset legend {
    color: #2563eb !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    padding: 0 10px !important;
}

/* ===========================================
   Table Styles
   =========================================== */
.table {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1);
}

.table thead {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
}

.table thead tr {
    color: #ffffff !important;
}

.table thead th {
    border: none !important;
    padding: 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: #ffffff !important;
}

.table thead th a,
.table thead tr th a,
.table thead > tr > th > a {
    color: #ffffff !important;
    text-decoration: none;
}

.table thead th a:hover,
.table thead tr th a:hover,
.table thead > tr > th > a:hover {
    color: #e0e7ff !important;
    text-decoration: none;
}

/* Override any conflicting table header styles */
.table > thead > tr > th,
.table > thead > tr > td {
    color: #ffffff !important;
}

.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Additional overrides for all table header variations */
.table > thead > tr > th,
.table > thead > tr > td,
.table > thead > tr > th,
.table > thead > tr > td {
    color: #ffffff !important;
}

/* Override styles.css table header color - handled by specific thead rules above */

.table > thead > tr > th,
.table > thead > tr > td {
    color: #ffffff !important;
}

/* DataTables specific */
table.dataTable thead th,
table.dataTable thead td {
    color: #ffffff !important;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
}

table.dataTable thead tr {
    color: #ffffff !important;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: rgba(37, 99, 235, 0.05);
    transform: scale(1.01);
}

.table tbody td {
    padding: 15px;
    border-color: #e5e7eb;
    vertical-align: middle;
}

/* ===========================================
   Responsive Design
   =========================================== */
@media screen and (max-width: 768px) {
    .panel-body {
        padding: 25px 15px !important;
    }
    
    .StepTitle {
        font-size: 1.2rem !important;
    }
    
    .panel-body .links a,
    .panel-body .cl-effect-1 a {
        font-size: 1rem !important;
    }
    
    .mainTitle {
        font-size: 1.5rem !important;
    }
    
    .sidebar {
        box-shadow: none;
        margin-right: 0;
    }
    
    .main-content {
        padding: 15px 10px !important;
    }
    
    .app-content {
        padding-left: 0 !important;
    }
    
    .wrap-content.container {
        padding: 15px !important;
    }
    
    .container-fullw.bg-white {
        margin: 0 5px;
    }
}

/* Fix for col-sm-4 spacing */
.container-fullw .row .col-sm-4 {
    margin-bottom: 25px;
    padding: 0 10px;
}

@media screen and (max-width: 576px) {
    .container-fullw .row .col-sm-4 {
        margin-bottom: 20px;
        padding: 0 5px;
    }
}

