/* ========================================
   PERSPECT MEDICAL BILLING - BRAND STYLES
   ========================================
   Brand Red: #6E0000
   Brand Red Hover: #8B0000
   Body Font: Montserrat
   Heading Font: Lato
   ======================================== */

/* ----------------------------------------
   BASE TYPOGRAPHY
   ---------------------------------------- */
body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    color: #333;
}

/* ----------------------------------------
   BRAND COLORS - LINKS
   ---------------------------------------- */
a {
    color: #6E0000;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: #8B0000;
    text-decoration: underline;
}

/* Keep Bootstrap nav links default until hovered */
.navbar-default .navbar-nav > li > a {
    color: #777;
}

.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
    color: #6E0000;
}

.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
    color: #6E0000;
    background-color: transparent;
}

/* ----------------------------------------
   BRAND BUTTONS
   ---------------------------------------- */
.btn-brand {
    background: linear-gradient(135deg, #6E0000 0%, #8B0000 100%);
    color: #fff;
    border: none;
    font-family: 'Lato', sans-serif;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-brand:hover,
.btn-brand:focus {
    background: linear-gradient(135deg, #8B0000 0%, #A00000 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(110, 0, 0, 0.3);
}

.btn-brand:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Override Bootstrap primary to use brand colors */
.btn-primary {
    background: linear-gradient(135deg, #6E0000 0%, #8B0000 100%);
    border-color: #6E0000;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    background: linear-gradient(135deg, #8B0000 0%, #A00000 100%);
    border-color: #8B0000;
}

/* ----------------------------------------
   BRAND PANELS
   ---------------------------------------- */
.panel-brand {
    border-color: #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.panel-brand > .panel-heading {
    background: linear-gradient(135deg, #6E0000 0%, #8B0000 100%);
    color: #fff;
    font-family: 'Lato', sans-serif;
    font-weight: 600;
    font-size: 16px;
    border: none;
    border-radius: 8px 8px 0 0;
    padding: 15px 20px;
}

.panel-brand > .panel-heading a {
    color: #fff;
}

.panel-brand > .panel-body {
    padding: 20px;
}

/* ----------------------------------------
   SECTION HEADERS WITH ACCENT
   ---------------------------------------- */
.section-title {
    font-family: 'Lato', sans-serif;
    font-weight: 600;
    color: #333;
    border-left: 4px solid #6E0000;
    padding-left: 12px;
    margin-bottom: 20px;
}

/* ----------------------------------------
   BRAND CARDS / SECTIONS
   ---------------------------------------- */
.brand-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.brand-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.brand-section-header h4 {
    margin: 0;
    font-family: 'Lato', sans-serif;
    font-weight: 600;
    color: #333;
    border-left: 3px solid #6E0000;
    padding-left: 10px;
}

/* ----------------------------------------
   FORM STYLING
   ---------------------------------------- */
.form-control:focus {
    border-color: #6E0000;
    box-shadow: 0 0 0 2px rgba(110, 0, 0, 0.1);
}

label {
    font-family: 'Lato', sans-serif;
    font-weight: 600;
    color: #333;
}

/* ----------------------------------------
   TABLE STYLING
   ---------------------------------------- */
.table > thead > tr > th {
    font-family: 'Lato', sans-serif;
    font-weight: 600;
    background-color: #f8f8f8;
    border-bottom: 2px solid #6E0000;
}

.table-brand > thead > tr > th {
    background: linear-gradient(135deg, #6E0000 0%, #8B0000 100%);
    color: #fff;
    border-bottom: none;
}

/* DataTables brand styling - Red text instead of red block */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: transparent !important;
    color: #6E0000 !important;
    border-color: #6E0000 !important;
    font-weight: bold !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f5f5f5 !important;
    color: #6E0000 !important;
    border-color: #ddd !important;
}

/* ----------------------------------------
   PAGE HEADER - CURVED DESIGN
   ---------------------------------------- */
.page-header-brand {
    display: flex;
    align-items: stretch;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-family: 'Montserrat', sans-serif;
    overflow: hidden;
    min-height: 70px;
    width: 100%;
    max-width: 1600px;
}

.page-header-brand .header-logo {
    background: #fff;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.page-header-brand .header-logo img {
    height: 40px;
    width: auto;
}

.page-header-brand .header-curve {
    width: 50px;
    background: linear-gradient(135deg, #6E0000 0%, #8B0000 100%);
    position: relative;
    margin-left: -25px;
    z-index: 1;
}

.page-header-brand .header-curve::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 50px;
    background: #fff;
    border-radius: 0 50% 50% 0 / 0 50% 50% 0;
}

.page-header-brand .header-content {
    flex: 1;
    background: linear-gradient(135deg, #6E0000 0%, #8B0000 100%);
    color: #fff;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-header-brand .header-greeting h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Lato', sans-serif;
    color: #fff !important;
}

.page-header-brand .header-date {
    margin: 3px 0 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.page-header-brand .header-page-title {
    text-align: right;
    display: flex;
    align-items: center;
    gap: 20px;
}

.page-header-brand .header-page-title span {
    font-size: 16px;
    font-weight: 600;
    font-family: 'Lato', sans-serif;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.page-header-brand .session-timer {
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: none;
    letter-spacing: normal;
    font-weight: normal;
}

.page-header-brand .session-timer.warning {
    background: #e74c3c;
    animation: session-pulse 1s infinite;
}

@keyframes session-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ----------------------------------------
   ALERTS - BRAND COLORS
   ---------------------------------------- */
.alert-brand {
    background-color: #fff5f5;
    border-color: #6E0000;
    color: #6E0000;
}

/* ----------------------------------------
   BREADCRUMB STYLING
   ---------------------------------------- */
.breadcrumb {
    background-color: #f8f8f8;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
}

.breadcrumb > li > a {
    color: #6E0000;
}

.breadcrumb > .active {
    color: #666;
}

/* ----------------------------------------
   STATUS BADGES
   ---------------------------------------- */
.badge-brand {
    background-color: #6E0000;
    color: #fff;
}

.label-brand {
    background-color: #6E0000;
}

/* ----------------------------------------
   VIEW ALL LINKS
   ---------------------------------------- */
.view-all-link {
    color: #6E0000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.view-all-link:hover {
    color: #8B0000;
    text-decoration: underline;
}

/* ----------------------------------------
   LOADING STATES
   ---------------------------------------- */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #6E0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ----------------------------------------
   ACTION ICON BUTTONS
   ---------------------------------------- */
.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: #fff;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 2px;
}

.action-icon:hover {
    background: #f5f5f5;
    border-color: #ccc;
    transform: translateY(-1px);
}

.action-icon.action-view {
    color: #337ab7;
}

.action-icon.action-view:hover {
    background: #e8f4fc;
    border-color: #337ab7;
}

.action-icon.action-edit {
    color: #f0ad4e;
}

.action-icon.action-edit:hover {
    background: #fdf5e6;
    border-color: #f0ad4e;
}

.action-icon.action-delete {
    color: #d9534f;
}

.action-icon.action-delete:hover {
    background: #fdf2f2;
    border-color: #d9534f;
}

.action-icon.action-archive {
    color: #777;
}

.action-icon.action-archive:hover {
    background: #f5f5f5;
    border-color: #777;
}

.action-icon.action-resubmit {
    color: #5cb85c;
}

.action-icon.action-resubmit:hover {
    background: #eef9ee;
    border-color: #5cb85c;
}

.action-icon.action-validate {
    background: #5cb85c;
    color: #fff;
    border-color: #5cb85c;
}

.action-icon.action-validate:hover {
    background: #449d44;
    border-color: #449d44;
}

.action-icon.action-fax {
    color: #6E0000;
}

.action-icon.action-fax:hover {
    background: #fff5f5;
    border-color: #6E0000;
}

.action-icon.action-pdf {
    color: #d9534f;
}

.action-icon.action-pdf:hover {
    background: #fdf2f2;
    border-color: #d9534f;
}

.action-icon.action-mark-paid {
    background: #5cb85c;
    color: #fff;
    border-color: #5cb85c;
    font-weight: bold;
    font-size: 14px;
}

.action-icon.action-mark-paid:hover {
    background: #449d44;
    border-color: #449d44;
}

/* ----------------------------------------
   RESPONSIVE ADJUSTMENTS
   ---------------------------------------- */
@media (max-width: 768px) {
    .page-header-brand {
        flex-direction: column;
    }

    .page-header-brand .header-logo {
        justify-content: center;
        padding: 12px;
    }

    .page-header-brand .header-curve {
        display: none;
    }

    .page-header-brand .header-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* ----------------------------------------
   WIDE TABLES — sideways scroll on narrow screens
   When a data table is wider than the window, let it scroll
   left/right inside its own frame (scrollbar on desktop, swipe
   on touch) instead of being cut off at the window edge.
   ---------------------------------------- */
.dataTables_wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
