/* ========================================
   MODERN SITE-WIDE STYLING ENHANCEMENTS
   ======================================== */

/* CSS Variables for Consistent Theming */
:root {
    --primary-color: #1fb5ad;
    --primary-hover: #1a9d96;
    --primary-light: #e0f7f6;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --background-light: #f8fafc;
    --background-white: #ffffff;
    --background-gray: #f1f2f7;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   GLOBAL IMPROVEMENTS
   ======================================== */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Open Sans', sans-serif;
    color: var(--text-primary);
    background: var(--background-gray);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-base);
    border: 1px solid transparent;
    padding: 0.625rem 1.25rem;
    font-size: 15px;
    line-height: 1.5;
    box-shadow: var(--shadow-xs);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    min-height: 2.5rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-xs);
}

/* Button Icons */
.btn i,
.btn .fa {
    line-height: 1;
    vertical-align: middle;
}

.btn i:only-child,
.btn .fa:only-child {
    margin: 0;
}

.btn i:not(:only-child),
.btn .fa:not(:only-child) {
    margin-right: 0.375rem;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
}

.btn-success {
    background: #95b75d;
    border-color: #95b75d;
    color: white;
}

.btn-success:hover {
    background: #88a755;
    border-color: #88a755;
    color: white;
}

.btn-danger {
    background: #fa8564;
    border-color: #fa8564;
    color: white;
}

.btn-danger:hover {
    background: #ec6459;
    border-color: #ec6459;
    color: white;
}

.btn-warning {
    background: #f3c022;
    border-color: #f3c022;
    color: white;
}

.btn-warning:hover {
    background: #e4ba00;
    border-color: #e4ba00;
    color: white;
}

.btn-info {
    background: var(--info-color);
    border-color: var(--info-color);
}

.btn-default {
    background: var(--background-white);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-default:hover {
    background: var(--background-light);
    border-color: var(--secondary-color);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 17px;
    border-radius: var(--radius-lg);
    min-height: 3rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 14px;
    border-radius: var(--radius-md);
    min-width: 2.5rem;
    min-height: 2.25rem;
}

.btn-xs {
    padding: 0.4375rem 0.75rem;
    font-size: 13px;
    border-radius: var(--radius-sm);
    min-width: 2rem;
    min-height: 2rem;
}

.btn-disabled {
    background-color: var(--background-light);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn:disabled,
.btn.disabled,
button:disabled,
button.disabled {
    background-color: var(--background-light) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    pointer-events: none;
    box-shadow: none !important;
}

.btn:disabled:hover,
.btn.disabled:hover {
    transform: none !important;
}

/* ========================================
   FORMS & INPUTS
   ======================================== */

.form-control {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.625rem 0.875rem;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--background-white);
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-xs);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(31, 181, 173, 0.1), var(--shadow-sm);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--background-light);
    opacity: 0.7;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea,
select {
    transition: all var(--transition-fast);
}

/* ========================================
   PANELS & CARDS
   ======================================== */

.panel {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    background: var(--background-white);
    margin-bottom: 1.5rem;
    transition: box-shadow var(--transition-base);
}

.panel:hover {
    box-shadow: var(--shadow-md);
}

.panel-heading {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(to bottom, var(--background-white) 0%, var(--background-light) 100%);
}

.panel-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-body {
    padding: 1.25rem;
}

.panel-footer {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 1rem 1.25rem;
    background: var(--background-light);
    border-top: 1px solid var(--border-color);
}

.panel-default > .panel-heading {
    background: linear-gradient(to bottom, #fafbfc 0%, var(--background-light) 100%);
}

.panel-primary > .panel-heading {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border-color: var(--primary-color);
}

/* ========================================
   TABLES
   ======================================== */

.table {
    background: var(--background-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(to bottom, #fafbfc 0%, var(--background-light) 100%);
    border-bottom: 2px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0.02em;
    padding: 1.125rem 2.5rem 1.125rem 1.25rem;
    white-space: nowrap;
}

.table tbody tr {
    transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
    background-color: var(--background-light);
}

.table td {
    padding: 1.125rem 1.25rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
    font-size: 15px;
}

.table td:first-child,
.table th:first-child {
    padding-left: 1.5rem;
}

.table td:last-child,
.table th:last-child {
    padding-right: 1.5rem;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(248, 250, 252, 0.5);
}

.table-bordered {
    border: 1px solid var(--border-color);
}

.table-bordered th,
.table-bordered td {
    border: 1px solid var(--border-color);
}

.table-hover tbody tr:hover {
    background-color: var(--background-light);
    cursor: pointer;
}

/* Table Responsive Wrapper */
.table-responsive {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

/* DataTables Enhancements */
table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0;
    border-radius: var(--radius-lg);
    font-size: 15px;
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    cursor: pointer;
    position: relative;
    transition: background-color var(--transition-fast);
}

table.dataTable thead .sorting:hover,
table.dataTable thead .sorting_asc:hover,
table.dataTable thead .sorting_desc:hover {
    background-color: #e8eef3;
}

table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after {
    content: "" !important;
}

table.dataTable thead .sorting:after {
    opacity: 0.2;
    content: "" !important;
}

/* DataTables Wrapper */
div.dataTables_wrapper {
    padding: 1.5rem;
    background: var(--background-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

/* DataTables Header Controls */
div.dataTables_wrapper .dataTables_length,
div.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1.25rem;
}

div.dataTables_wrapper .dataTables_length label,
div.dataTables_wrapper .dataTables_filter label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

div.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.625rem 2.5rem 0.625rem 0.875rem;
    font-size: 15px;
    background: var(--background-white);
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-xs);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}

div.dataTables_wrapper .dataTables_length select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(31, 181, 173, 0.1);
}

div.dataTables_filter input {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.125rem;
    margin-left: 0.75rem;
    font-size: 15px;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-xs);
    min-width: 280px;
}

div.dataTables_filter input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(31, 181, 173, 0.1);
}

div.dataTables_filter input::placeholder {
    color: var(--text-muted);
}

/* DataTables Info and Pagination */
div.dataTables_wrapper .dataTables_info {
    padding: 1rem 0 0.5rem;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
}

div.dataTables_wrapper .dataTables_paginate {
    padding: 1rem 0 0.5rem;
}

div.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.625rem 1rem;
    margin: 0 0.25rem;
    background: var(--background-white);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    font-size: 15px;
    font-weight: 500;
    box-shadow: var(--shadow-xs);
}

div.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--background-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

div.dataTables_wrapper .dataTables_paginate .paginate_button.current,
div.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

div.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
div.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background: var(--background-light);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
    box-shadow: none;
}

div.dataTables_processing {
    border: 2px solid var(--primary-color) !important;
    border-radius: var(--radius-lg);
    background: var(--background-white);
    box-shadow: var(--shadow-xl);
    top: 50% !important;
    transform: translateY(-50%);
    padding: 1.5rem 2rem;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

/* DataTable Action Columns */
.dataTables_wrapper td:last-child,
.dataTables_wrapper th:last-child {
    white-space: nowrap;
}

.dataTables_wrapper td .btn,
.dataTables_wrapper td button {
    margin: 0.125rem 0.25rem;
}

.dataTables_wrapper td form {
    display: inline-block;
}

/* Esigns List Table - Larger Fonts */
.esigns-list table.dataTable {
    font-size: 15px !important;
}

.esigns-list table.dataTable thead th {
    font-size: 15px !important;
    padding: 16px 12px !important;
}

.esigns-list table.dataTable tbody td {
    font-size: 15px !important;
    padding: 16px 12px !important;
}

.esigns-list .dataTables_wrapper .dataTables_length label,
.esigns-list .dataTables_wrapper .dataTables_filter label {
    font-size: 15px !important;
}

.esigns-list .dataTables_wrapper .dataTables_length select,
.esigns-list .dataTables_wrapper .dataTables_filter input {
    font-size: 15px !important;
    padding: 10px 14px !important;
}

.esigns-list .dataTables_wrapper .dataTables_length select option {
    font-size: 15px !important;
}

.esigns-list .dataTables_wrapper .dataTables_info,
.esigns-list .dataTables_wrapper .dataTables_paginate {
    font-size: 15px !important;
}

.esigns-list .dataTables_wrapper .dataTables_paginate .paginate_button {
    font-size: 15px !important;
    padding: 10px 16px !important;
}

.esigns-list .btn {
    font-size: 15px !important;
    padding: 10px 18px !important;
}

.esigns-list .btn-sm {
    font-size: 15px !important;
    padding: 8px 14px !important;
}

.esigns-list .btn-lg {
    font-size: 17px !important;
    padding: 12px 24px !important;
}

.esigns-list .btn-link {
    font-size: 16px !important;
}

/* Additional specificity for DataTables elements */
.esigns-list div.dataTables_wrapper div.dataTables_length select {
    font-size: 15px !important;
}

.esigns-list div.dataTables_wrapper div.dataTables_filter input {
    font-size: 15px !important;
}

/* Esigns Form - Larger Fonts */
.esign-form {
    font-size: 15px !important;
}

.esign-form label {
    font-size: 15px !important;
}

.esign-form input,
.esign-form select,
.esign-form textarea {
    font-size: 15px !important;
    padding: 10px 14px !important;
}

.esign-form .btn {
    font-size: 15px !important;
    padding: 10px 18px !important;
}

/* DataTables Empty State */
.dataTables_empty {
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 15px;
    background: var(--background-light);
}

/* DataTables Row Hover */
table.dataTable tbody tr {
    transition: all var(--transition-fast);
}

table.dataTable tbody tr:hover {
    background-color: var(--background-light);
    box-shadow: inset 0 0 0 1px var(--border-color);
}

table.dataTable tbody tr.selected {
    background-color: rgba(31, 181, 173, 0.1);
}

/* DataTables Responsive */
@media (max-width: 768px) {
    div.dataTables_wrapper {
        padding: 1rem;
    }
    
    div.dataTables_filter input {
        min-width: 180px;
        font-size: 15px;
    }
    
    div.dataTables_wrapper .dataTables_length label,
    div.dataTables_wrapper .dataTables_filter label {
        font-size: 15px;
    }
    
    table.dataTable {
        font-size: 15px;
    }
}

/* ========================================
   ALERTS & NOTIFICATIONS
   ======================================== */

.alert {
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background-color: #d1fae5;
    border-color: #6ee7b7;
    color: #065f46;
}

.alert-info {
    background-color: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.alert-warning {
    background-color: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

.alert-danger {
    background-color: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

.alert .close {
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.alert .close:hover {
    opacity: 1;
}

/* ========================================
   MODALS
   ======================================== */

.modal-content {
    border-radius: var(--radius-xl);
    border: none;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(to bottom, var(--background-white) 0%, var(--background-light) 100%);
}

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

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--background-light);
}

.modal-backdrop.in {
    opacity: 0.6;
}

/* ========================================
   DROPDOWNS
   ======================================== */

.dropdown-menu {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown-menu > li > a,
.dropdown-menu > li > button {
    padding: 0.625rem 1.25rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    display: block;
    clear: both;
    font-weight: 400;
    line-height: 1.42857143;
    white-space: nowrap;
    background-color: transparent;
    border: none;
    width: 100%;
    text-align: left;
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > button:hover {
    background-color: var(--background-light);
    color: var(--primary-color);
}

.dropdown-menu > .active > a {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* ========================================
   BADGES & LABELS
   ======================================== */

.badge,
.label {
    border-radius: var(--radius-md);
    padding: 0.375rem 0.75rem;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    display: inline-block;
}

.badge-primary,
.label-primary {
    background-color: var(--primary-color);
}

.badge-success,
.label-success {
    background-color: var(--success-color);
}

.badge-danger,
.label-danger {
    background-color: var(--danger-color);
}

.badge-warning,
.label-warning {
    background-color: var(--warning-color);
}

.badge-info,
.label-info {
    background-color: var(--info-color);
}

/* ========================================
   NAVIGATION & SIDEBAR
   ======================================== */

.sidebar-toggle-box {
    transition: all var(--transition-base);
    border-radius: var(--radius-md);
    z-index: 1003; /* Ensure hamburger menu is above top-nav elements */
}

.sidebar-toggle-box:hover {
    background: var(--primary-color);
    transform: scale(1.05);
}

.sidebar-toggle-box:active {
    background: var(--primary-hover);
    transform: scale(0.98);
}

/* Top Navigation */
.top-nav {
    box-shadow: var(--shadow-sm);
}

.top-nav .nav > li > a {
    transition: all var(--transition-fast);
}

.top-nav .nav > li > a:hover {
    background-color: rgba(31, 181, 173, 0.1);
}

/* ========================================
   PAGINATION
   ======================================== */

.pagination > li > a,
.pagination > li > span {
    border-radius: var(--radius-md);
    margin: 0 0.25rem;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.pagination > li > a:hover {
    background-color: var(--background-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination > .active > a,
.pagination > .active > span {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ========================================
   BREADCRUMBS
   ======================================== */

.breadcrumb {
    background-color: var(--background-white);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-xs);
}

.breadcrumb > li + li:before {
    color: var(--text-muted);
}

/* ========================================
   TABS
   ======================================== */

.nav-tabs {
    border-bottom: 2px solid var(--border-color);
}

.nav-tabs > li > a {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    margin-right: 0.25rem;
    transition: all var(--transition-fast);
}

.nav-tabs > li > a:hover {
    background-color: var(--background-light);
    border-color: var(--border-color);
}

.nav-tabs > li.active > a {
    border-bottom-color: transparent;
    border-top: 2px solid var(--primary-color);
    font-weight: 500;
}

/* ========================================
   PROGRESS BARS
   ======================================== */

.progress {
    border-radius: var(--radius-lg);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    background-color: var(--background-light);
}

.progress-bar {
    border-radius: var(--radius-lg);
    transition: width var(--transition-slow);
}

/* ========================================
   WELLS & CONTAINERS
   ======================================== */

.well {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    background-color: var(--background-light);
}

/* ========================================
   CUSTOM COMPONENTS
   ======================================== */

/* Table Action Buttons */
.table .btn-sm,
.dataTables_wrapper .btn-sm,
td .btn-sm,
th .btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: 15px;
    min-width: 2.5rem;
    min-height: 2.25rem;
    margin: 0.125rem;
}

.table .btn-sm i,
.dataTables_wrapper .btn-sm i,
td .btn-sm i,
th .btn-sm i {
    font-size: 15px;
    line-height: 1;
}

/* Inline Forms in Tables */
.inline-block {
    display: inline-block;
    margin: 0.125rem;
}

form.inline-block {
    margin: 0.125rem;
}

/* Action Column Spacing */
td .btn-group,
td .btn-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}

/* Text Colors */
.text-terques {
    color: var(--primary-color);
}

.text-gold {
    color: #FFD700;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Notification Elements */
.notification-element {
    transition: opacity var(--transition-base);
}

.notification-element.read {
    opacity: 0.5;
}

/* Document & File Holders */
.document-holder {
    margin-top: 0.5rem;
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--background-white);
    box-shadow: var(--shadow-xs);
}

.document-holder > div {
    height: auto;
    min-height: 32px;
}

/* Folder Actions */
.folder-actions {
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: var(--background-white);
    box-shadow: var(--shadow-xs);
}

/* Task Info */
.dropdown-menu .task-info {
    background: var(--background-light);
    border-radius: var(--radius-md);
    padding: 0.875rem;
    margin-bottom: 0.75rem;
    transition: background-color var(--transition-fast);
}

.dropdown-menu .task-info:hover {
    background: var(--background-gray);
}

/* Leads Chaser Link */
.leads-chaser-link {
    border: 1px solid var(--border-color) !important;
    background: transparent !important;
    border-radius: var(--radius-md) !important;
    padding: 0.5rem !important;
    transition: all var(--transition-fast);
}

.leads-chaser-link:hover {
    border-color: var(--primary-color) !important;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

/* Prize Wallet */
.prize-wallet i {
    font-size: 1.625rem;
    margin: 0.375rem 0.5rem;
    color: #FFD700;
    transition: transform var(--transition-fast);
}

.prize-wallet i:hover {
    transform: scale(1.1);
}

/* ========================================
   HEADER & BRAND MODERNIZATION
   ======================================== */

/* Header */
.header {
    background: var(--background-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid var(--border-color);
}

/* Brand Area */
.brand {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    position: relative;
    overflow: hidden;
}

.brand::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

a.logo {
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 18px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-base);
    padding: 0 1rem;
}

a.logo:hover {
    transform: translateY(-50%) scale(1.02);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Sidebar Toggle */
.sidebar-toggle-box {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
    z-index: 1003; /* Ensure hamburger menu is above top-nav elements */
}

.sidebar-toggle-box:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.sidebar-toggle-box:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.98);
}

.sidebar-toggle-box .fa-bars {
    color: white;
    font-size: 1.25rem;
}

/* Top Navigation */
.top-nav {
    background: transparent;
    padding: 0.75rem 1rem;
}

.top-nav .nav.pull-right {
    margin-right: 0;
}

.top-nav .nav.pull-left {
    margin-left: 0;
    position: relative;
    z-index: 50;
}

/* Top Menu Items */
ul.top-menu > li {
    margin: 0 0.25rem;
}

ul.top-menu > li > a {
    background: var(--background-light);
    color: var(--text-primary);
    border-radius: var(--radius-lg);
    padding: 0.625rem 1rem;
    font-size: 15px;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-xs);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

ul.top-menu > li > a:hover,
ul.top-menu > li > a:focus {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

ul.top-menu > li > a i {
    font-size: 1.125rem;
}

/* User Dropdown */
.top-nav .dropdown-toggle.icon-user {
    background: var(--background-light);
    border-radius: var(--radius-lg);
    padding: 0.625rem 1rem;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-xs);
}

.top-nav .dropdown-toggle.icon-user:hover {
    background: var(--background-white);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.top-nav .dropdown-toggle.icon-user .username {
    margin: 0 0.5rem;
    font-weight: 500;
    font-size: 15px;
    color: var(--text-primary);
}

.top-nav .dropdown-toggle.icon-user i {
    color: var(--primary-color);
}

/* Notification Badge */
.badge.bg-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    min-width: 1.25rem;
    text-align: center;
}

/* Notification Bell Mobile */
.notification-bell-mobile {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
}

.notification-bell-mobile:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.notification-bell-mobile a {
    color: white !important;
}

/* Notification Dropdown */
.dropdown-menu.extended.notification {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    padding: 0;
    margin-top: 0.75rem;
    min-width: 320px;
    max-height: 480px;
    overflow-y: auto;
}

.dropdown-menu.extended.logout {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    margin-top: 0.75rem;
}

.dropdown-menu.extended.logout > li > a {
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
    color: var(--text-primary);
}

.dropdown-menu.extended.logout > li > a:hover {
    background: var(--background-light);
    color: var(--primary-color);
    transform: translateX(4px);
}

.dropdown-menu.extended.logout > li > a i {
    color: var(--primary-color);
    margin-right: 0.75rem;
    font-size: 1.125rem;
}

/* PC Notifications */
.pc-version-notifications {
    display: flex;
    align-items: center;
}

/* Header Notification Bar */
#header_notification_bar > a {
    position: relative;
}

/* Try Esign Button Enhancement */
.try-out-esign-btn {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.try-out-esign-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

/* Subscribe Button */
.subscribe-large,
.subscribe-mobile {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    box-shadow: var(--shadow-md);
}

/* Login/Register Buttons in Header */
.top-nav .btn-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #2563eb 100%);
}

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

/* Responsive Header Improvements */
@media (max-width: 768px) {
    .brand {
        height: 70px;
    }
    
    a.logo {
        font-size: 1.125rem;
    }
    
    .top-nav {
        padding: 0.5rem;
    }
    
    ul.top-menu > li > a {
        padding: 0.5rem 0.75rem;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .brand {
        height: 60px;
    }
    
    a.logo {
        font-size: 1rem;
        letter-spacing: 0.25px;
    }
}

/* ========================================
   SIDEBAR MENU MODERNIZATION
   ======================================== */

/* Sidebar Container */
#sidebar {
    background: linear-gradient(180deg, #2d2d35 0%, #1f1f24 100%);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
}

.leftside-navigation {
    background: transparent;
}

/* Sidebar Menu */
ul.sidebar-menu {
    padding-top: 90px;
}

ul.sidebar-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: all var(--transition-fast);
}

ul.sidebar-menu li:hover {
    background: rgba(31, 181, 173, 0.05);
}

/* Menu Links */
ul.sidebar-menu li a {
    color: #b8bcc4;
    padding: 1.125rem 1.5rem;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

ul.sidebar-menu li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--primary-color);
    transform: translateX(-100%);
    transition: transform var(--transition-base);
}

ul.sidebar-menu li a:hover::before,
ul.sidebar-menu li a.active::before {
    transform: translateX(0);
}

ul.sidebar-menu li a:hover,
ul.sidebar-menu li a:focus {
    background: rgba(31, 181, 173, 0.1);
    color: #ffffff;
    padding-left: 1.75rem;
}

ul.sidebar-menu li a.active {
    background: linear-gradient(90deg, rgba(31, 181, 173, 0.15) 0%, rgba(31, 181, 173, 0.05) 100%);
    color: var(--primary-color);
    font-weight: 600;
}

/* Menu Icons */
ul.sidebar-menu li a i {
    font-size: 20px;
    padding-right: 1rem;
    width: 2.5rem;
    text-align: center;
    transition: all var(--transition-fast);
}

ul.sidebar-menu li a:hover i,
ul.sidebar-menu li a:focus i,
ul.sidebar-menu li a.active i {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Submenu */
ul.sidebar-menu li ul.sub {
    background: rgba(0, 0, 0, 0.2);
    margin: 0;
    padding: 0.5rem 0;
    transition: all 0.3s ease-in-out;
}

ul.sidebar-menu li ul.sub li {
    background: transparent;
    border-bottom: none;
}

ul.sidebar-menu li ul.sub li a {
    font-size: 15px;
    padding: 0.9375rem 1.5rem 0.9375rem 4rem;
    color: #9ca3af;
    position: relative;
}

ul.sidebar-menu li ul.sub li a::before {
    content: '';
    position: absolute;
    left: 2.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    background: #6b7280;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

ul.sidebar-menu li ul.sub li a:hover::before,
ul.sidebar-menu li ul.sub li.active a::before {
    background: var(--primary-color);
    width: 7px;
    height: 7px;
}

ul.sidebar-menu li ul.sub li a:hover,
ul.sidebar-menu li ul.sub li.active a {
    background: rgba(31, 181, 173, 0.08);
    color: #ffffff;
    padding-left: 4.25rem;
}

ul.sidebar-menu li ul.sub li.active a {
    color: var(--primary-color);
}

/* Nested Submenu */
#sidebar .sub-menu > .sub li a {
    padding-left: 5rem;
}

/* Accordion Icon */
.dcjq-icon {
    height: 1.125rem;
    width: 1.125rem;
    border-radius: var(--radius-sm);
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    transition: all var(--transition-fast);
    opacity: 0.6;
}

.dcjq-icon::before {
    content: '\f107';
    font-family: 'FontAwesome';
    color: #9ca3af;
    font-size: 0.875rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.active .dcjq-icon {
    transform: translateY(-50%) rotate(180deg);
    opacity: 1;
}

.active .dcjq-icon::before {
    color: var(--primary-color);
}

ul.sidebar-menu li:hover .dcjq-icon {
    opacity: 1;
}

/* Mail Info Badge */
.mail-info {
    background: var(--primary-color);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-lg);
    font-size: 0.6875rem;
    font-weight: 600;
    margin: 0 0 0 0.5rem;
    box-shadow: 0 2px 4px rgba(31, 181, 173, 0.3);
}

/* Disabled Links */
ul.sidebar-menu li .disabled-link {
    opacity: 0.5;
    cursor: not-allowed;
}

ul.sidebar-menu li .disabled-link:hover,
ul.sidebar-menu li .disabled-link:hover > * {
    color: #6b7280 !important;
    background: transparent !important;
    padding-left: 1.5rem !important;
}

/* Sidebar Scrollbar */
#sidebar::-webkit-scrollbar {
    width: 6px;
}

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

#sidebar::-webkit-scrollbar-thumb {
    background: rgba(31, 181, 173, 0.3);
    border-radius: var(--radius-lg);
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(31, 181, 173, 0.5);
}

/* Main Content Adjustment */
#main-content {
    background: var(--background-gray);
    min-height: calc(100vh - 80px);
}

.wrapper {
    background: transparent;
}

/* Responsive Sidebar */
@media (max-width: 768px) {
    ul.sidebar-menu {
        padding-top: 70px;
    }
    
    ul.sidebar-menu li a {
        padding: 0.875rem 1.25rem;
        font-size: 15px;
    }
    
    ul.sidebar-menu li ul.sub li a {
        padding: 0.75rem 1.25rem 0.75rem 3rem;
        font-size: 15px;
    }
}

/* Menu Section Headers (if any) */
ul.sidebar-menu li.menu-header {
    padding: 1rem 1.5rem 0.5rem;
    color: #6b7280;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: transparent;
    border-bottom: none;
}

/* Active Menu Item Highlight */
ul.sidebar-menu li.active {
    background: rgba(31, 181, 173, 0.08);
}

ul.sidebar-menu li.active > a {
    color: var(--primary-color);
}

/* Menu Item with Badge/Counter */
ul.sidebar-menu li a .badge {
    margin-left: auto;
    background: var(--primary-color);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-lg);
    font-size: 0.6875rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(31, 181, 173, 0.3);
}

/* Hover Effect Enhancement */
ul.sidebar-menu li a:hover {
    box-shadow: inset 3px 0 0 var(--primary-color);
}

/* Focus State for Accessibility */
ul.sidebar-menu li a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

/* Smooth Expand/Collapse Animation */
ul.sidebar-menu li ul.sub {
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

ul.sidebar-menu li.active > ul.sub {
    max-height: none;
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background-light);
    border-radius: var(--radius-lg);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: var(--radius-lg);
    transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Glow Animation for Special Buttons */
.try-out-esign-btn {
    font-weight: bold;
    font-size: 1.1875rem;
    padding: 0.625rem 1.25rem;
    animation: glow 1s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 2px #fff, 0 0 4px var(--primary-color), 0 0 6px var(--primary-color), 0 0 8px var(--primary-color);
    }
    to {
        box-shadow: 0 0 2px #fff, 0 0 6px var(--primary-color), 0 0 8px var(--primary-color), 0 0 12px var(--primary-color);
    }
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */

@media (min-width: 768px) {
    .align-items-sm-center {
        -webkit-box-align: center !important;
        -ms-flex-align: center !important;
        align-items: center !important;
    }
}

@media (max-width: 768px) {
    .try-out-esign-mobile-btn {
        display: block;
        width: 240px;
        margin: 1rem auto 2rem;
    }
    
    .nav a.try-out-esign-btn {
        display: none;
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Minimum Touch Target Size (44x44px for mobile) */
@media (max-width: 768px) {
    .btn,
    .btn-sm,
    .btn-xs {
        min-height: 2.75rem;
        min-width: 2.75rem;
        padding: 0.625rem 1rem;
    }
}

/* Focus Visible for Keyboard Navigation */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .no-print {
        display: none !important;
    }
    
    .panel,
    .table {
        box-shadow: none !important;
    }
}

/* ========================================
   DATATABLE FONT SIZE OVERRIDES
   Force larger fonts for all DataTables
   ======================================== */

/* DataTable select dropdowns */
.dataTables_length select,
div.dataTables_length select,
.dataTables_wrapper .dataTables_length select {
    font-size: 15px !important;
}

/* DataTable select options */
.dataTables_length select option,
div.dataTables_length select option {
    font-size: 15px !important;
}

/* DataTable filter inputs */
.dataTables_filter input,
div.dataTables_filter input,
.dataTables_wrapper .dataTables_filter input {
    font-size: 15px !important;
}

/* DataTable info text */
.dataTables_info,
div.dataTables_info {
    font-size: 15px !important;
}

/* DataTable pagination */
.dataTables_paginate,
div.dataTables_paginate,
.dataTables_paginate .paginate_button,
.dataTables_paginate a {
    font-size: 15px !important;
}


/* ========================================
   ESIGN TEMPLATE EDITOR FIELD OVERRIDES
   Fix white text on hover issue
   ======================================== */

/* Override button styles for esign template editor field buttons */
#esign-template-editor-component .esign-template-editor-component-document-field .btn,
#esign-template-editor-component .esign-template-editor-component-document-field .btn *,
#esign-template-editor-component .esign-template-editor-component-document-field .btn-default,
#esign-template-editor-component .esign-template-editor-component-document-field .btn-default *,
#esign-template-editor-component .esign-template-editor-component-document-field .btn-block,
#esign-template-editor-component .esign-template-editor-component-document-field .btn-block *,
.esign-template-editor-component-document-field .btn,
.esign-template-editor-component-document-field .btn *,
.esign-template-editor-component-document-field .btn-default,
.esign-template-editor-component-document-field .btn-default *,
.esign-template-editor-component-document-field .btn-block,
.esign-template-editor-component-document-field .btn-block * {
    color: #0f172a !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#esign-template-editor-component .esign-template-editor-component-document-field:hover .btn,
#esign-template-editor-component .esign-template-editor-component-document-field:hover .btn *,
#esign-template-editor-component .esign-template-editor-component-document-field:hover .btn-default,
#esign-template-editor-component .esign-template-editor-component-document-field:hover .btn-default *,
#esign-template-editor-component .esign-template-editor-component-document-field:hover .btn-block,
#esign-template-editor-component .esign-template-editor-component-document-field:hover .btn-block *,
#esign-template-editor-component .esign-template-editor-component-document-field .btn:hover,
#esign-template-editor-component .esign-template-editor-component-document-field .btn:hover *,
#esign-template-editor-component .esign-template-editor-component-document-field .btn-default:hover,
#esign-template-editor-component .esign-template-editor-component-document-field .btn-default:hover *,
#esign-template-editor-component .esign-template-editor-component-document-field .btn-block:hover,
#esign-template-editor-component .esign-template-editor-component-document-field .btn-block:hover *,
.esign-template-editor-component-document-field:hover .btn,
.esign-template-editor-component-document-field:hover .btn *,
.esign-template-editor-component-document-field:hover .btn-default,
.esign-template-editor-component-document-field:hover .btn-default *,
.esign-template-editor-component-document-field:hover .btn-block,
.esign-template-editor-component-document-field:hover .btn-block *,
.esign-template-editor-component-document-field .btn:hover,
.esign-template-editor-component-document-field .btn:hover *,
.esign-template-editor-component-document-field .btn-default:hover,
.esign-template-editor-component-document-field .btn-default:hover *,
.esign-template-editor-component-document-field .btn-block:hover,
.esign-template-editor-component-document-field .btn-block:hover * {
    color: #0f172a !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

#esign-template-editor-component .esign-template-editor-component-document-field .btn:focus,
#esign-template-editor-component .esign-template-editor-component-document-field .btn:focus *,
#esign-template-editor-component .esign-template-editor-component-document-field .btn-default:focus,
#esign-template-editor-component .esign-template-editor-component-document-field .btn-default:focus *,
#esign-template-editor-component .esign-template-editor-component-document-field .btn-block:focus,
#esign-template-editor-component .esign-template-editor-component-document-field .btn-block:focus *,
.esign-template-editor-component-document-field .btn:focus,
.esign-template-editor-component-document-field .btn:focus *,
.esign-template-editor-component-document-field .btn-default:focus,
.esign-template-editor-component-document-field .btn-default:focus *,
.esign-template-editor-component-document-field .btn-block:focus,
.esign-template-editor-component-document-field .btn-block:focus * {
    color: #0f172a !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
