/* ACE Custom Styles - Bootstrap 5 Enhanced */

:root {
    --bs-primary: #3063a0;
    --bs-primary-rgb: 48, 99, 160;
    --bs-secondary: #6c757d;
    --bs-secondary-rgb: 108, 117, 125;
    --bs-dark: #212529;
    --bs-light: #f8f9fa;
    --bs-border-color: #dee2e6;
    --bs-body-color: #495057;
    --ace-gradient-primary: linear-gradient(135deg, #3063a0 0%, #264f83 100%);
    --ace-gradient-primary-dark: linear-gradient(
        135deg,
        #264f83 0%,
        #1e3f6a 100%
    );
    --ace-gradient-light: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    --ace-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --ace-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --ace-shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
    --ace-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --ace-transition-fast: all 0.2s ease;
    --ace-transition-slow: all 0.5s ease;
}

/* Global Styles */
body {
    font-family: "Fira Sans", sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}

/* Layout Styles */
.container-fluid {
    padding: 0;
}

.row {
    margin: 0;
}

.col-lg-3,
.col-xl-2 {
    padding: 0;
}

/* Navbar Styles */
.navbar-ace {
    background: var(--ace-gradient-primary) !important;
    border-bottom: 1px solid #264f83;
    min-height: 60px;
    padding: 0.5rem 1rem;
    box-shadow: var(--ace-shadow);
}

.navbar-ace .navbar-brand img {
    max-height: 40px;
    transition: transform 0.2s ease;
}

.navbar-ace .navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-ace .navbar-text {
    font-weight: 500;
    letter-spacing: 0.5px;
}

.navbar-ace .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    margin: 0 0.25rem;
}

.navbar-ace .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white !important;
}

.navbar-ace .dropdown-menu {
    border: none;
    box-shadow: var(--ace-shadow);
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

/* Text Utility Classes */
.text-muted {
    color: #6c757d !important;
    font-weight: 500;
}

/* Main Content */
.main-content-ace {
    background-color: #f8f9fa;
    min-height: 100vh;
    padding: 1.5rem;
}

/* Page Structure */
.page {
    /*background-color: #ffffff;*/
    /*border-radius: 0.5rem;*/
    /*box-shadow: var(--ace-shadow-sm);*/
    /*border: 1px solid #e9ecef;*/
    /*margin: 1rem;*/
}

.page-inner {
    /*padding: 2rem;*/
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.page-title {
    color: #212529;
    font-weight: 700;
    margin-bottom: 0;
    border-bottom: 3px solid #3063a0;
    padding-bottom: 0.75rem;
}

.page-title-bar {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.page-title-bar .btn-toolbar {
    gap: 0.5rem;
}

/* Cards */
.card {
    border: 1px solid #e9ecef;
    box-shadow: var(--ace-shadow-sm);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

/* Buttons */
.btn {
    border-radius: 0.375rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: var(--ace-transition);
    box-shadow: var(--ace-shadow-sm);
    border: 1px solid transparent;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: var(--ace-gradient-primary);
    border-color: #3063a0;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #264f83 0%, #1e3f6a 100%);
    border-color: #264f83;
    color: white;
}

.btn-secondary {
    background-color: #495057;
    border-color: #495057;
    color: white;
}

.btn-secondary:hover {
    background-color: #343a40;
    border-color: #343a40;
    color: white;
}

.btn-outline-secondary {
    background-color: white;
    border-color: #6c757d;
    color: #495057;
    border-width: 1.5px;
}

.btn-outline-secondary:hover {
    background-color: #495057;
    border-color: #495057;
    color: white;
    transform: translateY(-1px);
}

.btn-outline-primary {
    background-color: white;
    border-color: #3063a0;
    color: #264f83;
    font-weight: 600;
    border-width: 1.5px;
}

.btn-outline-primary:hover {
    background-color: #3063a0;
    border-color: #3063a0;
    color: white;
    transform: translateY(-1px);
}

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

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

.btn-outline-success {
    background-color: white;
    border-color: #198754;
    color: #198754;
}

.btn-outline-success:hover {
    background-color: #198754;
    border-color: #198754;
    color: white;
}

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

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

.btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: 0.9rem;
    font-weight: 600;
    min-height: 2.25rem;
    min-width: 2.25rem;
}

.btn-icon {
    padding: 0.625rem;
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
}

.btn-icon i {
    font-size: 1rem;
}

/* Improved accessibility for icon-only buttons */
.btn-icon-only {
    position: relative;
}

.btn-icon-only:focus::after,
.btn-icon-only:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #212529;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 0.25rem;
}

/* Better focus states for accessibility */
.btn:focus {
    outline: 2px solid #3063a0;
    outline-offset: 2px;
    box-shadow: 0 0 0 0.2rem rgba(48, 99, 160, 0.25);
}

/* Minimum touch target size for mobile accessibility */
@media (max-width: 768px) {
    .btn-sm {
        min-height: 44px;
        min-width: 44px;
        padding: 0.625rem 1rem;
    }

    .btn-icon {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Tables */
.table {
    background-color: #ffffff;
    margin-bottom: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--ace-shadow-sm);
    border: 1px solid #dee2e6;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #212529;
    padding: 1rem 0.75rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: #f1f3f5;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table td {
    padding: 0.875rem 0.75rem;
    border-top: 1px solid #dee2e6;
    vertical-align: middle;
    color: #212529;
    font-weight: 500;
}

.table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f3f5;
}

.table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.table tbody tr:hover {
    background-color: rgba(48, 99, 160, 0.08) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.table-responsive {
    border-radius: 0.5rem;
    box-shadow: var(--ace-shadow);
}

.table a {
    color: #1a5490;
    text-decoration: none;
    font-weight: 600;
}

.table a:hover {
    color: #0d2d4a;
    text-decoration: underline;
}

.table .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Badge variants with better contrast */
.badge.bg-success {
    background-color: #198754 !important;
    color: white !important;
}

.badge.bg-warning {
    background-color: #fd7e14 !important;
    color: white !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
    color: white !important;
}

.badge.bg-info {
    background-color: #0dcaf0 !important;
    color: #212529 !important;
}

.badge.bg-primary {
    background-color: #3063a0 !important;
    color: white !important;
}

.badge.bg-secondary {
    background-color: #495057 !important;
    color: white !important;
}

/* Forms */
.form-control {
    border-radius: 0.375rem;
    border: 2px solid #ced4da;
    padding: 0.5rem 0.75rem;
    transition:
        border-color 0.15s ease-in-out,
        box-shadow 0.15s ease-in-out;
    color: #212529;
    font-weight: 500;
}

.form-control:focus {
    border-color: #3063a0;
    box-shadow: 0 0 0 0.2rem rgba(48, 99, 160, 0.25);
    color: #212529;
}

.form-select {
    border-radius: 0.375rem;
    border: 2px solid #ced4da;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    color: #212529;
    font-weight: 500;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    appearance: none;
    cursor: pointer;
    min-height: 44px;
}

.form-select:focus {
    border-color: #3063a0;
    box-shadow: 0 0 0 0.2rem rgba(48, 99, 160, 0.25);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%233063A0' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
}

.form-select:hover {
    border-color: #adb5bd;
    transition:
        border-color 0.15s ease-in-out,
        box-shadow 0.15s ease-in-out;
}

.form-select option {
    padding: 0.5rem 0.75rem;
    background-color: #fff;
    color: #212529;
}

.form-select option:hover {
    background-color: #f8f9fa;
}

/* Ensure proper spacing for select elements in forms */
.form-select + .form-text {
    margin-top: 0.25rem;
}

/* Add visual distinction for empty/placeholder options */
.form-select option:first-child {
    color: #6c757d;
    font-style: italic;
}

/* Enhanced select styles for different contexts */
.select-client {
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    font-weight: 600;
}

.select-client:focus {
    background-color: #fff;
    border-color: #3063a0;
    box-shadow: 0 0 0 0.2rem rgba(48, 99, 160, 0.25);
}

.select-assignment {
    border-left: 4px solid #ffc107;
    padding-left: 0.5rem;
}

.select-assignment:focus {
    border-left-color: #3063a0;
}

.select-contract {
    border-left: 4px solid #198754;
    padding-left: 0.5rem;
}

.select-contract:focus {
    border-left-color: #3063a0;
}

/* Warning state for missing selections */
.form-select.is-warning {
    border-color: #ffc107;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffc107' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
}

.form-select.is-warning:focus {
    border-color: #3063a0;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
}

.input-group {
    border-radius: 0.375rem;
    overflow: hidden;
    box-shadow: var(--ace-shadow-sm);
}

.input-group-text {
    background-color: #f1f3f5;
    border-color: #ced4da;
    color: #495057;
    font-weight: 600;
    border: 2px solid #ced4da;
}

/* Search and Filter */
.search-container {
    background: var(--ace-gradient-light);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--ace-shadow-sm);
    border: 1px solid #dee2e6;
}

.filter-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

.filter-form .form-group {
    display: flex;
    flex-direction: column;
}

.filter-form .form-label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

/* Pagination */
.pagination {
    margin-bottom: 0;
    gap: 0.25rem;
    --bs-pagination-color: #3063a0;
    --bs-pagination-hover-color: #264f83;
    --bs-pagination-active-bg: #3063a0;
    --bs-pagination-active-border-color: #3063a0;
}

.page-link {
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    color: #3063a0;
    padding: 0.5rem 0.75rem;
    margin: 0 0.125rem;
    min-width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-link:hover {
    background-color: rgba(48, 99, 160, 0.1);
    border-color: #3063a0;
    color: #264f83;
    transform: translateY(-1px);
    box-shadow: var(--ace-shadow);
}

.page-item.active .page-link {
    background: var(--ace-gradient-primary);
    border-color: #3063a0;
    color: white;
    font-weight: 600;
}

.page-item.disabled .page-link {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    color: #6c757d;
}

/* Messages - basic alert styles for visibility */
.alert {
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-dismissible .btn-close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    padding: 1.25rem 1.25rem;
}

/* Admin-specific component styles to reduce template duplication */
.admin-form-section {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--ace-shadow-sm);
}

.admin-invoice-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.admin-stats-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    text-align: center;
    margin-bottom: 1rem;
}

.admin-stats-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #3063a0;
    margin-bottom: 0.25rem;
}

.admin-stats-card .stat-label {
    color: #6c757d;
    font-size: 0.875rem;
}

.ace-info-box {
    background: #d1ecf1;
    border: 1px solid #b8daff;
    border-left: 4px solid #0dcaf0;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0.375rem;
    color: #055160;
}

.ace-warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0.375rem;
    color: #664d03;
}

.ace-conditional-field {
    display: none;
    margin-top: 0.75rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

.ace-conditional-field.show {
    display: block;
}

.admin-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .admin-form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.admin-help-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.admin-completion-bar {
    background: #e9ecef;
    border-radius: 0.5rem;
    height: 1.25rem;
    position: relative;
    overflow: hidden;
}

.admin-completion-fill {
    background: linear-gradient(90deg, #dc3545 0%, #ffc107 50%, #28a745 100%);
    height: 100%;
    border-radius: 0.5rem;
    transition: width 0.3s ease;
}

.admin-missing-var {
    display: inline-block;
    background: #dc3545;
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    margin: 0.125rem;
}

/* Footer */
.footer-ace {
    background: var(--ace-gradient-light);
    border-top: 1px solid #dee2e6;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
    margin-top: 2rem;
}

.footer-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(
        135deg,
        rgba(48, 99, 160, 0.1) 0%,
        rgba(48, 99, 160, 0.2) 100%
    );
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(48, 99, 160, 0.2);
}

.footer-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    margin: 0 0.25rem;
    display: inline-flex;
    align-items: center;
}

.footer-link:hover {
    color: #3063a0;
    background-color: rgba(48, 99, 160, 0.1);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Client Cards */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.client-grid-item {
    transition: var(--ace-transition);
}

.client-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--ace-shadow);
    border: 1px solid #e9ecef;
    transition: var(--ace-transition);
    margin-bottom: 1.5rem;
}

.client-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ace-shadow-lg);
}

/* Empty States */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.empty-state-content {
    text-align: center;
    max-width: 400px;
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(48, 99, 160, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(48, 99, 160, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(48, 99, 160, 0);
    }
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .filter-form {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .clients-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-content-ace {
        padding: 1rem;
    }

    .page {
        margin: 0.5rem;
    }

    .page-inner {
        padding: 1rem;
    }
}

/* Scrollbar Styling */

/* Utility Classes */
.text-primary {
    color: var(--bs-primary) !important;
    font-weight: 600;
}

.bg-primary {
    background-color: var(--bs-primary) !important;
}

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

.text-dark {
    color: #212529 !important;
    font-weight: 600;
}

.text-secondary {
    color: #495057 !important;
    font-weight: 500;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--bs-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

/* User Table Specific Improvements */
.table tbody tr td:first-child {
    font-weight: 600;
    color: #212529;
}

.table tbody tr td {
    color: #212529;
}

.table tbody tr td:nth-child(2),
.table tbody tr td:nth-child(3) {
    color: #495057;
    font-weight: 500;
}

/* Action buttons in tables */
.table .btn-icon {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0.375rem;
    border: 2px solid;
    font-weight: 600;
}

.table .btn-outline-secondary {
    border-color: #495057;
    color: #495057;
    background-color: white;
}

.table .btn-outline-secondary:hover {
    background-color: #495057;
    border-color: #495057;
    color: white;
}

/* Improve visibility of muted text in tables */
.table .text-muted {
    color: #6c757d !important;
    font-weight: 500;
}

/* Date/time styling in tables */
.table small {
    color: #495057;
    font-weight: 500;
}

/* Row striping with better contrast */
.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(48, 99, 160, 0.02);
}

.table-striped > tbody > tr:nth-of-type(even) > td {
    background-color: white;
}

/* Dropdown Improvements */
.dropdown-menu {
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: var(--ace-shadow);
    border-radius: 0.375rem;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.375rem 1rem;
    color: #212529;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #3063a0;
}

.dropdown-header {
    padding: 0.5rem 1rem;
    margin-bottom: 0;
    font-size: 0.875rem;
    color: #495057;
    background-color: transparent;
    font-weight: 700;
}

/* ================================
   AUTH/LOGIN PAGE STYLES
   ================================ */

/* Main auth container */
.auth {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 1rem;
}

/* Auth header with logo */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    margin: 0;
}

.auth-header img {
    max-width: 100%;
    height: auto;
    filter: brightness(1.1);
}

/* Auth form container */
.auth-form {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Form label group for floating labels */
.form-label-group {
    position: relative;
    margin-bottom: 1rem;
}

.form-label-group input {
    height: 3.125rem;
    border-radius: 0.5rem;
    border: 2px solid #e9ecef;
    padding: 1rem 0.75rem 0.25rem 0.75rem;
    transition: all 0.2s ease;
}

.form-label-group input:focus {
    border-color: var(--ace-primary-color);
    box-shadow: 0 0 0 0.2rem rgba(48, 99, 160, 0.25);
}

.form-label-group input:focus ~ label,
.form-label-group input:not(:placeholder-shown) ~ label {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    color: var(--ace-primary-color);
    opacity: 1;
}

/* Auth form buttons */
.auth-form .btn {
    height: 3.125rem;
    border-radius: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: none;
    transition: all 0.2s ease;
}

.auth-form .btn-primary {
    border: none;
    box-shadow: 0 4px 15px rgba(48, 99, 160, 0.3);
}

.auth-form .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(48, 99, 160, 0.4);
}

/* Recovery links */
.auth-form .link {
    color: var(--ace-primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.auth-form .link:hover {
    color: #4a6fa5;
    text-decoration: underline;
}

/* Auth footer */
.auth-footer {
    margin-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

/* Error messages */
.auth-form .text-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border-left: 4px solid #dc3545;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .auth {
        padding: 1rem;
    }

    .auth-form {
        padding: 2rem 1.5rem;
    }

    .auth-header img {
        width: 280px;
    }
}

@media (max-width: 400px) {
    .auth-header img {
        width: 240px;
    }

    .auth-form {
        padding: 1.5rem 1rem;
    }
}

/* Enhanced Invoice and Billing Styles */
.billing-summary-card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--ace-shadow);
    transition: var(--ace-transition);
}

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

.billing-summary-header {
    background: var(--ace-gradient-primary) !important;
    border-radius: 12px 12px 0 0 !important;
    border: none;
}

.billing-line-item {
    border-bottom: 1px solid #f1f3f4;
    transition: var(--ace-transition-fast);
}

.billing-line-item:hover {
    background-color: #f8f9fa;
}

.billing-totals-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 3px solid var(--bs-primary);
}

.total-amount-primary {
    color: var(--bs-primary) !important;
    font-size: 1.3em;
    font-weight: 700;
}

.total-amount-success {
    color: #28a745 !important;
    font-size: 1.1em;
    font-weight: 600;
}

.checklist-card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--ace-shadow);
}

.checklist-header {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
    color: #212529 !important;
    border-radius: 12px 12px 0 0 !important;
    border: none;
}

.checklist-item {
    transition: var(--ace-transition-fast);
    border-radius: 6px;
    margin-bottom: 4px;
}

.checklist-item:hover {
    background-color: #fff3cd;
}

.checklist-complete {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #28a745;
    border-radius: 8px;
}

.invoice-card-enhanced {
    border: none;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    background: white;
    overflow: hidden;
}

.invoice-header-enhanced {
    background: var(--ace-gradient-primary);
    color: white;
    padding: 2rem;
    position: relative;
}

.invoice-header-enhanced::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffd700 0%, #ff6b6b 50%, #4ecdc4 100%);
}

.amount-highlight {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 12px;
    font-weight: bold;
}

.currency-badge {
    background: var(--ace-gradient-primary);
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    margin-right: 4px;
}

/* PDF-specific enhancements */
.pdf-totals-enhanced {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-top: 4px solid #b5bd00;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

.pdf-total-row {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.pdf-total-row:last-child {
    border-bottom: none;
    border-top: 2px solid #b5bd00;
    padding-top: 12px;
    margin-top: 8px;
}

.pdf-line-item {
    border-bottom: 1px solid #dee2e6;
    padding: 8px;
    transition: background-color 0.2s ease;
}

.pdf-line-item:nth-child(even) {
    background-color: #f8f9fa;
}

.pdf-header-enhanced {
    background: #b5bd00;
    color: white;
    padding: 12px;
    font-weight: bold;
    border-radius: 6px 6px 0 0;
}
