/* ============================================
   CopIX Theme Variables
   ============================================ */
:root {
    /* Primary Red Theme Colors */
    --copix-bg-darkest: #1a0808;
    --copix-bg-dark: #3b0b0b;
    --copix-bg-medium: #4b1212;
    --copix-bg-light: #501010;
    --copix-bg-accent: #611010;
    
    /* Primary Colors */
    --copix-primary: #7f1d1d;
    --copix-primary-hover: #991b1b;
    --copix-primary-active: #b91c1c;
    
    /* Border Colors */
    --copix-border: #7f1d1d;
    --copix-border-light: #5f1515;
    --copix-border-focus: #991b1b;
    --copix-border-accent: #cd5c5c;  /* For dashed borders - indianred, similar to lightcoral */
    
    /* Text Colors */
    --copix-text-primary: #ffffff;
    --copix-text-light: #ffdddd;
    --copix-text-muted: #d99b9b;
    --copix-text-subtle: #9ca3af;
    
    /* Layout-specific Text Colors */
    --copix-header-text: #e8b4b4;    /* Muted rose for header/footer - replaces lightblue */
    --copix-content-text: #f5f0e6;   /* Warm off-white for content - replaces wheat */
    
    /* Scrollbar Colors */
    --copix-scrollbar-track: #2a1515;  /* Dark burgundy - replaces #223145 blue-gray */
    --copix-scrollbar-thumb: #7f1d1d;  /* Theme primary - replaces darkred */
    
    /* Status Colors - Consistent across app */
    --copix-success: #34d399;
    --copix-success-bg: rgba(52, 211, 153, 0.15);
    --copix-success-border: rgba(52, 211, 153, 0.3);
    
    --copix-warning: #f97316;
    --copix-warning-bg: rgba(249, 115, 22, 0.15);
    --copix-warning-border: rgba(249, 115, 22, 0.3);
    
    --copix-danger: #ef4444;
    --copix-danger-bg: rgba(239, 68, 68, 0.15);
    --copix-danger-border: rgba(239, 68, 68, 0.3);
    
    --copix-info: #60a5fa;
    --copix-info-bg: rgba(96, 165, 250, 0.15);
    --copix-info-border: rgba(96, 165, 250, 0.3);
    
    /* Kanban/Status Specific Colors */
    --copix-status-needs-attention: #ef4444;
    --copix-status-hold-requested: #f97316;
    --copix-status-hold-placed: #eab308;
    --copix-status-transportation-setup: #60a5fa;
    --copix-status-transportation-inprogress: #34d399;
    --copix-status-finished: #10b981;
    --copix-status-inactive: #6b7280;
    
    /* Border Radius - Standardized */
    --copix-radius-sm: 4px;
    --copix-radius-md: 8px;
    --copix-radius-lg: 12px;
    --copix-radius-full: 9999px;
    
    /* Shadows */
    --copix-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --copix-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --copix-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    
    /* Transitions */
    --copix-transition: 0.2s ease;
    
    /* Spacing Scale (unified from Billing module) */
    --copix-space-xs: 0.25rem;   /* 4px */
    --copix-space-sm: 0.5rem;    /* 8px */
    --copix-space-md: 1rem;      /* 16px */
    --copix-space-lg: 1.5rem;    /* 24px */
    --copix-space-xl: 2rem;      /* 32px */
    --copix-space-2xl: 3rem;     /* 48px */
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* ============================================
   Global Scrollbar Styles
   ============================================ */
* {
    scrollbar-width: thin;
    scrollbar-color: darkred #2a1010;
}

*::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

*::-webkit-scrollbar-track {
    background: #2a1010;
}

*::-webkit-scrollbar-thumb {
    background-color: darkred;
    border-radius: 2px;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: #a00000;
}

a, .btn-link {
    color: var(--copix-text-muted);
    transition: color var(--copix-transition);
}

a:hover, .btn-link:hover {
    color: var(--copix-text-light);
}

.nav-link {    
    color: var(--copix-text-light);
    text-decoration: none;
    transition: color var(--copix-transition), text-decoration var(--copix-transition);
}
    .nav-link:hover {
        
        color: var(--copix-text-primary);
        text-decoration: underline;
    }

    .nav-link.active {
        background-color: var(--copix-bg-accent) !important;
    }

.btn-primary {
    color: var(--copix-text-primary);
    background-color: var(--copix-primary);
    border-color: var(--copix-border);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--copix-primary-hover);
    border-color: var(--copix-primary-hover);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--copix-primary-hover);
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--copix-success);
}

.invalid {
    outline: 1px solid var(--copix-danger);
}

.validation-message {
    color: var(--copix-danger);
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.c-pointer {
    cursor: pointer;
}

h1,
h2,
h3,
h4 {
    color: #ffdddd;
    margin-bottom: 1rem;
}

/* Styles for table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: #4b1212;
}

th,
td {
    border: 1px solid #7f1d1d;
    padding: 10px;
    text-align: left;
    color: #ffdddd !important;
}

thead th {
    background-color: #501010 !important;
    color: #ffdddd !important;
    font-weight: normal;
}

tbody tr:nth-child(odd) td {
    background-color: #3b0b0b;
}

tbody tr:nth-child(even) td {
    background-color: #4b1212;
}

/* Styles for form controls  */
.form-control,
.form-select {
    background-color: #4b1212 !important;
    color: #ffffff !important;
    border: 1px solid #7f1d1d !important;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    transition: border-color 0.2s;
}

    .form-control:focus,
    .form-select:focus {
        border-color: #ffdddd;
        outline: none;
    }

    .form-control:-webkit-autofill {
        -webkit-box-shadow: 0 0 0px 1000px #4b1212 inset !important;
        -webkit-text-fill-color: #ffffff !important;
        transition: background-color 5000s ease-in-out 0s;
    }

    .form-control:-moz-autofill {
        box-shadow: 0 0 0px 1000px #4b1212 inset !important;
        -moz-text-fill-color: #ffffff !important;
    }

    input.form-control::placeholder {
        color: #ffffff80 !important; 
        opacity: 1; 
    }

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    background-color: #4b1212;
    border: 1px solid #7f1d1d;
    border-radius: 0.25rem;
    cursor: pointer;
}

    .form-check-input:checked {
        background-color: #611010;
        border-color: #ffdddd;
    }

.form-check-label {
    color: #ffffff;
    margin-left: 0.5rem;
}


.btn {
    background-color: #611010;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-right: 10px;
}

    .btn:hover,
    .btn:focus {
        background-color: #7f1d1d;
        outline: none;
    }

    .btn:disabled {
        background-color: #555555;
        cursor: not-allowed;
    }

/* Styles for modal window - contained within article element */
.modal,
.modal.show,
.modal.show.d-block {
    position: absolute !important;
    top: 0;
    left: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    outline: 0;
    background: rgba(0, 0, 0, 0.6);
    padding: 1rem 0;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: auto;
    max-width: 500px;
    flex-shrink: 0;
}

.modal-content {
    position: relative;
    background-color: #4b1212;
    border: 1px solid #7f1d1d;
    border-radius: 4px;
    box-shadow: 0 3px 9px rgba(0,0,0,0.5);
    padding: 20px;
    color: #ffffff;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #7f1d1d;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.btn-close {
    color: #ffffff !important;
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
    color: #ffdddd;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #7f1d1d;
    padding-top: 10px;
}

/* Modal backdrop - contained within article element */
.modal-backdrop,
.modal-backdrop.show,
.modal-backdrop.fade.show {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1040;
}

/* Syncfusion dialog container - ensure dialogs are contained within article */
.e-dlg-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.e-dialog {
    position: absolute !important;
    max-height: calc(100% - 2rem) !important;
    overflow-y: auto !important;
}

/* Ensure Syncfusion dialog content is scrollable if needed */
.e-dlg-content {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.role-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .role-list li {
        margin-bottom: 5px;
    }


/* Syncfusion Dropdown List */
.e-dropdownlist {
    background-color: #4b1212 !important;
    color: #ffffff !important;
    border: 1px solid #7f1d1d !important;
    border-radius: 4px !important;
}

    .e-dropdownlist .e-input,
    .e-dropdownlist .e-input-group,
    .e-dropdownlist .e-dropdownbase {
        background-color: #4b1212 !important;
        color: #ffffff !important;
    }

    /* ??? ????????? ? ?????? */
    .e-dropdownlist:hover,
    .e-dropdownlist:focus-within {
        border-color: #ffdddd !important;
    }

    /* ????? ??? ?????????? ?????? ?????? Syncfusion Dropdown List */
    .e-ddl .e-input-group-icon {
        background-color: #611010 !important; /* ?????? ??? ??? ?????? */
        color: #ffffff !important; /* ??????? ???? ?????? */
        border-left: 1px solid #7f1d1d !important;
    }

    .e-dropdownbase .e-list-item,
    .e-ddl.e-control.e-dropdownlist {
        background-color: var(--copix-bg-medium);
        color: var(--copix-text-primary);
        border-color: var(--copix-text-light);
    }

        .e-ddl.e-control.e-dropdownlist .e-input-group input.e-input,
        .e-ddl.e-control.e-dropdownlist .e-input-group .e-input {
            background-color: var(--copix-bg-medium);
            color: var(--copix-text-primary);
            border: 1px solid var(--copix-text-muted);
        }



/* Syncfusion Checkbox */

.e-checkbox-wrapper .e-frame {
    background-color: var(--copix-bg-medium);
    border-color: var(--copix-text-muted);
    width: 20px !important;
    height: 20px !important;
    line-height: 20px !important;
}

    .e-checkbox-wrapper .e-frame.e-check {
        background-color: #4b1212;
        border: 1px solid #7f1d1d !important;
        border-radius: 4px !important;
        color: #FFFFFF;
        font-size: 11px !important;
    }

.e-checkbox-wrapper:hover .e-frame.e-check,
.e-css.e-checkbox-wrapper:hover .e-frame.e-check {
    background-color: #4b1212;
}

.e-checkbox-wrapper .e-label {
    color: #FFFFFF;
}

/* Syncfusion Radio Button */
.e-radio-wrapper {
    display: block;
}

.e-radio + label::before {
    background-color: #4b1212 !important;
    border: 1px solid #7f1d1d !important;
    border-radius: 50%;
    width: 1.25rem;
    height: 1.25rem;
}

    .e-radio:checked + label::before {
        background-color: #4b1212 !important;
        border: 1px solid #ffffff !important;
        border-radius: 50%;
        width: 1.25rem;
        height: 1.25rem;
    }

.e-radio + label::after {
    background-color: #ffffff !important;
    border: 1px solid #ffffff !important;
    border-radius: 50%;
    width: 0.55rem;
    height: 0.55rem;
    top: 0.35rem;
    left: 0.35rem;
}

.e-radio-wrapper .e-radio + .e-label {
    color: #FFFFFF;
}

.e-radio-wrapper .e-radio {
    border-color: var(--copix-text-muted);
}

    .e-radio-wrapper .e-radio:checked + .e-label::before {
        background-color: var(--copix-primary);
        border-color: var(--copix-text-muted);
    }

/* Syncfusion Input Text / TextBox */
.e-input, .e-textbox {
    background-color: #4b1212 !important;
    color: #ffffff !important;
    border: 1px solid #7f1d1d !important;
    border-radius: 4px !important;
    padding: 0.5rem 0.75rem !important;
}

    .e-input:focus, .e-textbox:focus {
        border-color: #ffdddd !important;
        outline: none !important;
    }

/* Syncfusion Button */
.e-btn.e-primary {
    background-color: var(--copix-primary);
    border-color: var(--copix-text-muted);
    color: var(--copix-text-primary);
}

    .e-btn.e-primary:hover,
    .e-btn.e-primary:focus {
        background-color: var(--copix-primary-hover);
        border-color: var(--copix-text-muted);
        box-shadow: 0 0 5px rgba(217, 155, 155, 0.5);
    }

    .e-btn.e-primary:disabled {
        background-color: var(--copix-bg-medium);
        border-color: var(--copix-text-muted);
        color: var(--copix-text-muted);
        opacity: 0.6;
    }




/* ????? ??? SfDropDownList (?????????? ??????) */


    /*

        .e-ddl.e-control.e-dropdownlist .e-input-group .e-input:focus {
            border-color: #D99B9B;
            box-shadow: 0 0 5px rgba(217, 155, 155, 0.5);*/ /* ????? ???????? ??? ?????? */
        /*}

        .e-ddl.e-control.e-dropdownlist .e-input-group .e-input::placeholder {
            color: #D99B9B;*/ /* ???? placeholder */
        /*}

    .e-ddl.e-control.e-dropdownlist .e-dropdown-btn {
        background-color: #5C2D3A;*/ /* ???? ?????? ??????????? ?????? */
        /*border-color: #D99B9B;
        color: #FFFFFF;
    }*/


/* ========================================
   Login Page Styles
   ======================================== */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 2rem 1rem;
}

.login-card {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px solid #7f1d1d;
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: #ffdddd;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #d99b9b;
    font-size: 0.95rem;
    margin: 0;
}

/* External Login Buttons */
.external-login-section {
    margin-bottom: 1.5rem;
}

.external-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.external-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-transform: none;
}

.external-login-btn .provider-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-google {
    background-color: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
}

.btn-google:hover,
.btn-google:focus {
    background-color: #f8f9fa;
    border-color: #d2e3fc;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3);
    color: #3c4043;
}

.btn-microsoft {
    background-color: #2f2f2f;
    color: #ffffff;
    border: 1px solid #4a4a4a;
}

.btn-microsoft:hover,
.btn-microsoft:focus {
    background-color: #404040;
    border-color: #5a5a5a;
    color: #ffffff;
}

.btn-external {
    background-color: #4b1212;
    color: #ffffff;
    border: 1px solid #7f1d1d;
}

/* Login Divider */
.login-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #d99b9b;
    font-size: 0.85rem;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #7f1d1d;
}

.login-divider span {
    padding: 0 1rem;
    white-space: nowrap;
}

/* Login Form */
.login-form .form-group {
    margin-bottom: 1.25rem;
}

.login-form .form-label {
    display: block;
    color: #ffdddd;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.login-form .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.login-form .form-control::placeholder {
    color: #ffffff60 !important;
}

/* Form Options Row */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffdddd;
    font-size: 0.9rem;
    cursor: pointer;
    margin: 0;
}

.remember-me .form-check-input {
    margin: 0;
}

.forgot-password {
    color: #d99b9b;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: #ffdddd;
    text-decoration: underline;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    border: none;
    transition: all 0.2s ease;
}

.btn-login:hover,
.btn-login:focus {
    background: linear-gradient(135deg, #991b1b, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(153, 27, 27, 0.4);
}

/* Login Footer */
.login-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #7f1d1d;
    text-align: center;
}

.login-footer p {
    color: #d99b9b;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.login-footer a {
    color: #ffdddd;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Validation Summary */
.validation-summary {
    background-color: rgba(220, 38, 38, 0.15);
    border: 1px solid #dc2626;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========================================
   External Login / Registration Page Styles
   ======================================== */

/* Provider Badge */
.provider-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    margin: 0 auto 1rem;
}

.provider-badge-google {
    background-color: #ffffff;
    border: 1px solid #dadce0;
}

.provider-badge-microsoft {
    background-color: #2f2f2f;
    border: 1px solid #4a4a4a;
}

.provider-badge-default {
    background-color: #4b1212;
    border: 1px solid #7f1d1d;
}

/* External Login Info Box */
.external-login-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: rgba(52, 168, 83, 0.1);
    border: 1px solid rgba(52, 168, 83, 0.3);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
    color: #a7f3d0;
    font-size: 0.9rem;
}

.external-login-info strong {
    color: #34d399;
}

/* Form Instructions */
.form-instructions {
    color: #d99b9b;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

/* ========================================
   Admin Pages Styles
   ======================================== */

.admin-container {
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-header {
    margin-bottom: 2rem;
}

.admin-header h1 {
    color: #ffdddd;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.admin-subtitle {
    color: #d99b9b;
    font-size: 0.95rem;
    margin: 0;
}

.header-with-back {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.btn-back {
    background: transparent;
    border: 1px solid #7f1d1d;
    color: #d99b9b;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-back:hover {
    background: #4b1212;
    color: #ffdddd;
}

/* Actions Bar */
.admin-actions {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Filters */
.admin-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    min-width: 200px;
}

.filter-group .form-label {
    display: block;
    color: #d99b9b;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

/* Admin Grid */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Admin Cards */
.admin-card {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px solid #7f1d1d;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.admin-card:hover {
    border-color: #991b1b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.admin-card.inactive {
    opacity: 0.7;
}

.admin-card .card-header {
    margin-bottom: 0.5rem;
    border: none;
    padding: 0;
    background: transparent;
}

.admin-card .card-header h3 {
    color: #ffdddd;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.admin-card .card-status {
    margin-bottom: 1rem;
}

.admin-card .card-body {
    margin-bottom: 1rem;
}

.admin-card .card-description {
    color: #d99b9b;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.admin-card .card-stats {
    display: flex;
    gap: 1.5rem;
}

.admin-card .stat {
    display: flex;
    flex-direction: column;
}

.admin-card .stat-value {
    color: #ffdddd;
    font-size: 1.5rem;
    font-weight: 600;
}

.admin-card .stat-label {
    color: #d99b9b;
    font-size: 0.75rem;
}

.admin-card .card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #5f1515;
}

.admin-card .card-actions .btn-icon-text {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.admin-card .card-actions .btn-icon-text:hover {
    transform: translateY(-1px);
}

.admin-card .card-actions .btn-emoji {
    font-size: 1rem;
    line-height: 1;
}

.admin-card .card-meta {
    margin-top: 0.5rem;
}

.admin-card .meta-item {
    color: #d99b9b;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.role-card .role-icon {
    font-size: 1.5rem;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.active {
    background: rgba(52, 168, 83, 0.2);
    color: #34d399;
    border: 1px solid rgba(52, 168, 83, 0.3);
}

.status-badge.inactive {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

/* Admin Table Styles */
.admin-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #7f1d1d;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.admin-table th {
    background: #501010 !important;
    color: #ffdddd !important;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid #7f1d1d;
}

.admin-table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #5f1515;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background: #501010;
}

.admin-table .inactive-row {
    opacity: 0.6;
}

.description-cell {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Domain Badge */
.domain-badge {
    background: #611010;
    color: #ffdddd;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9rem;
}

/* Role Badge */
.role-badge {
    background: var(--copix-info-bg);
    color: var(--copix-info);
    padding: 0.25rem 0.6rem;
    border-radius: var(--copix-radius-sm);
    font-size: 0.8rem;
    border: 1px solid var(--copix-info-border);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.btn-danger {
    background: #7f1d1d;
    border: 1px solid #991b1b;
}

.btn-danger:hover {
    background: #991b1b;
}

.btn-icon {
    margin-right: 0.5rem;
    font-weight: bold;
}

/* Loading & Empty States */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #d99b9b;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #5f1515;
    border-top-color: #ffdddd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #3b0b0b;
    border-radius: 12px;
    border: 1px dashed #7f1d1d;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #ffdddd;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #d99b9b;
    margin: 0;
}

/* Modal Enhancements - contained within article element */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 1050;
    padding: 1rem;
    overflow-y: auto;
}

.modal-dialog.modal-lg {
    max-width: 700px;
}

/* Form Enhancements */
.form-group {
    margin-bottom: 1.25rem;
}

.form-hint {
    color: #9ca3af;
    font-size: 0.8rem;
    margin-top: 0.35rem;
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.input-with-prefix {
    display: flex;
    align-items: center;
}

.input-prefix {
    background: #611010;
    color: #ffdddd;
    padding: 0.5rem 0.75rem;
    border: 1px solid #7f1d1d;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-family: monospace;
}

.input-with-prefix .form-control {
    border-radius: 0 4px 4px 0;
}

/* Info Box */
.info-box {
    background: var(--copix-info-bg);
    border: 1px solid var(--copix-info-border);
    border-radius: var(--copix-radius-md);
    padding: 1rem;
    margin-top: 1rem;
}

.info-box strong {
    color: var(--copix-info);
    display: block;
    margin-bottom: 0.5rem;
}

.info-box p {
    color: var(--copix-text-muted);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Alert */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-danger {
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: #fca5a5;
}

/* Text Utilities */
.text-warning {
    color: #fbbf24 !important;
}

/* User Management Specific */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-email {
    color: #ffdddd;
    font-weight: 500;
}

.admin-badge {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    color: #fff;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #4b1212;
    border: 1px solid #7f1d1d;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: #d99b9b;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #34d399;
    border-color: #34d399;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
    background-color: #fff;
}

/* Catalog Assignments */
.catalog-assignments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.assignment-badge {
    background: #611010;
    color: #ffdddd;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.assignment-more {
    color: #9ca3af;
    font-size: 0.75rem;
    padding: 0.2rem 0;
}

.no-assignments {
    color: #9ca3af;
    font-size: 0.85rem;
    font-style: italic;
}

/* User Header Info */
.user-header-info {
    background: #501010;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    color: #ffdddd;
}

/* Current Assignments */
.current-assignments {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.assignment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #501010;
    padding: 0.75rem 1rem;
    border-radius: 6px;
}

.assignment-details {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.catalog-name {
    color: #ffdddd;
    font-weight: 500;
}

.role-name {
    color: var(--copix-info);
    font-size: 0.85rem;
}

.no-assignments-text {
    color: #9ca3af;
    font-style: italic;
}

/* Add Assignment Form */
.add-assignment-form .form-row {
    align-items: flex-end;
}

.form-group-btn {
    display: flex;
    align-items: flex-end;
    padding-bottom: 0.1rem;
}

/* Admin Responsive - Tablet */
@media (max-width: 768px) {
    .admin-container {
        padding: 1rem;
    }
    
    .admin-filters {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
        min-width: auto;
    }
    
    .admin-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.75rem;
    }
    
    .header-with-back {
        flex-direction: column;
    }
}

/* Admin Responsive - Phone */
@media (max-width: 575px) {
    .admin-container {
        padding: 0.75rem;
    }
    
    .admin-header h1 {
        font-size: 1.4rem;
    }
    
    .admin-subtitle {
        font-size: 0.85rem;
    }
    
    .admin-card {
        padding: 1rem;
    }
    
    .admin-card .card-header h3 {
        font-size: 1rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
}

/* ============================================
   Memorandum Styles
   ============================================ */

/* Memorandum Navigation Link with Badge */
.memorandum-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.memorandum-nav-link .badge {
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Rich Text Editor Overrides for Dark Theme */
.e-richtexteditor {
    background-color: #fff !important;
}

.e-richtexteditor .e-rte-content {
    background-color: #fff !important;
    color: #212529 !important;
}

.e-richtexteditor .e-toolbar {
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
}

.e-richtexteditor .e-toolbar-item .e-tbar-btn {
    background-color: transparent !important;
    color: #212529 !important;
}

.e-richtexteditor .e-toolbar-item .e-tbar-btn:hover {
    background-color: #e9ecef !important;
}

/* Info Box Styles - Note: Primary info-box is defined above using CSS variables */
/* This variant is for warning-style info boxes */
.info-box.warning {
    background-color: var(--copix-warning-bg);
    border: 1px solid var(--copix-warning-border);
    border-radius: var(--copix-radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    color: var(--copix-warning);
}

.info-box.warning strong {
    display: block;
    margin-bottom: 0.5rem;
}

.info-box.warning p {
    margin: 0;
    font-size: 0.9rem;
}

/* ========================================
   Account Management Styles (Mobile-First)
   ======================================== */

/* Main Container */
.manage-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

/* Page Header */
.manage-page-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #5f1515;
}

.manage-page-header h1 {
    color: #ffdddd;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.manage-page-header p {
    color: #d99b9b;
    font-size: 0.9rem;
    margin: 0;
}

/* Content Layout - Mobile First */
.manage-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Desktop: Side-by-side layout */
@media (min-width: 768px) {
    .manage-content-wrapper {
        flex-direction: row;
        gap: 1.5rem;
    }
    
    .manage-nav-sidebar {
        width: 220px;
        flex-shrink: 0;
    }
    
    .manage-main-content {
        flex: 1;
        min-width: 0;
    }
}

/* Navigation Sidebar (Desktop) */
.manage-nav-sidebar {
    display: none;
}

@media (min-width: 768px) {
    .manage-nav-sidebar {
        display: block;
    }
}

.manage-nav {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px solid #7f1d1d;
    border-radius: 12px;
    padding: 0.5rem;
    list-style: none;
    margin: 0;
}

.manage-nav-item {
    margin: 0;
}

.manage-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: #d99b9b;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.manage-nav-link:hover {
    background: rgba(127, 29, 29, 0.5);
    color: #ffdddd;
}

.manage-nav-link.active {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    color: #ffffff;
}

.manage-nav-icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* Mobile Bottom Navigation */
.manage-mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border-top: 1px solid #7f1d1d;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0.25rem;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

@media (min-width: 768px) {
    .manage-mobile-nav {
        display: none;
    }
}

.manage-mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    color: #d99b9b;
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    min-width: 0;
    flex: 1;
    max-width: 80px;
}

.manage-mobile-nav-link:hover {
    color: #ffdddd;
}

.manage-mobile-nav-link.active {
    color: #ffffff;
    background: rgba(127, 29, 29, 0.5);
}

.manage-mobile-nav-icon {
    font-size: 1.25rem;
}

.manage-mobile-nav-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Add padding to body to account for mobile nav */
.manage-container {
    padding-bottom: 5rem;
}

@media (min-width: 768px) {
    .manage-container {
        padding-bottom: 1rem;
    }
}

/* Card Component */
.manage-card {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px solid #7f1d1d;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
    .manage-card {
        padding: 2rem;
    }
}

.manage-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #5f1515;
}

.manage-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    border-radius: 10px;
    font-size: 1.25rem;
}

.manage-card-title {
    color: #ffdddd;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.manage-card-subtitle {
    color: #d99b9b;
    font-size: 0.85rem;
    margin: 0.25rem 0 0 0;
}

/* Form Styles */
.manage-form .form-group {
    margin-bottom: 1.25rem;
}

.manage-form .form-label {
    display: block;
    color: #ffdddd;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.manage-form .form-control,
.manage-form .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    background-color: #2a0808;
    border: 1px solid #5f1515;
    border-radius: 8px;
    color: #ffdddd;
    transition: all 0.2s ease;
}

.manage-form .form-control:focus,
.manage-form .form-select:focus {
    border-color: #991b1b;
    box-shadow: 0 0 0 3px rgba(153, 27, 27, 0.25);
    outline: none;
}

.manage-form .form-control::placeholder {
    color: #ffffff50;
}

.manage-form .form-control:disabled,
.manage-form .form-control[readonly] {
    background-color: #1a0505;
    color: #9ca3af;
    cursor: not-allowed;
}

.manage-form .form-floating {
    position: relative;
}

.manage-form .form-floating > .form-control {
    height: calc(3.5rem + 2px);
    padding: 1rem 1rem 0.5rem;
}

.manage-form .form-floating > label {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1rem;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
    color: #ffffff60;
}

.manage-form .form-floating > .form-control:focus ~ label,
.manage-form .form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: 0.8;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    color: #d99b9b;
}

/* Input with verification checkmark */
.manage-input-verified {
    position: relative;
}

.manage-input-verified .form-control {
    padding-right: 3rem;
}

.manage-input-verified .verified-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #4ade80;
    font-size: 1.1rem;
}

/* Form hint text */
.manage-form .form-hint {
    color: #9ca3af;
    font-size: 0.8rem;
    margin-top: 0.35rem;
    display: block;
}

/* Buttons */
.manage-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.manage-btn-primary {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    color: #ffffff;
    border: none;
}

.manage-btn-primary:hover {
    background: linear-gradient(135deg, #991b1b, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(153, 27, 27, 0.4);
    color: #ffffff;
}

.manage-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.manage-btn-secondary {
    background: transparent;
    color: #d99b9b;
    border: 1px solid #7f1d1d;
}

.manage-btn-secondary:hover {
    background: rgba(127, 29, 29, 0.3);
    color: #ffdddd;
    border-color: #991b1b;
}

.manage-btn-danger {
    background: transparent;
    color: #f87171;
    border: 1px solid #dc2626;
}

.manage-btn-danger:hover {
    background: rgba(220, 38, 38, 0.2);
    color: #fca5a5;
}

.manage-btn-link {
    background: transparent;
    color: #d99b9b;
    border: none;
    padding: 0.5rem;
    font-weight: 500;
}

.manage-btn-link:hover {
    color: #ffdddd;
    text-decoration: underline;
}

.manage-btn-block {
    width: 100%;
}

.manage-btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Button group */
.manage-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

@media (max-width: 480px) {
    .manage-btn-group {
        flex-direction: column;
    }
    
    .manage-btn-group .manage-btn {
        width: 100%;
    }
}

/* Status Message */
.manage-status {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.manage-status-success {
    background: rgba(52, 168, 83, 0.15);
    border: 1px solid rgba(52, 168, 83, 0.3);
    color: #4ade80;
}

.manage-status-error {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #f87171;
}

.manage-status-warning {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.manage-status-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.manage-status-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Info Box */
.manage-info-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.manage-info-box p {
    color: #93c5fd;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.manage-info-box a {
    color: #60a5fa;
    font-weight: 500;
}

/* Warning Box */
.manage-warning-box {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.manage-warning-box p {
    color: #fca5a5;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.manage-warning-box strong {
    color: #f87171;
}

/* External Logins Table */
.manage-logins-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.manage-login-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.manage-login-item:last-child {
    margin-bottom: 0;
}

.manage-login-provider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.manage-login-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.1rem;
}

.manage-login-icon.google {
    background: #ffffff;
    color: #4285f4;
}

.manage-login-icon.microsoft {
    background: #2f2f2f;
    color: #ffffff;
}

.manage-login-icon.default {
    background: #4b1212;
    color: #ffdddd;
}

.manage-login-name {
    color: #ffdddd;
    font-weight: 500;
}

/* 2FA Section */
.manage-2fa-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.manage-2fa-enabled {
    border: 1px solid rgba(52, 168, 83, 0.3);
}

.manage-2fa-disabled {
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.manage-2fa-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.25rem;
}

.manage-2fa-enabled .manage-2fa-icon {
    background: rgba(52, 168, 83, 0.2);
    color: #4ade80;
}

.manage-2fa-disabled .manage-2fa-icon {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.manage-2fa-text h4 {
    color: #ffdddd;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.manage-2fa-text p {
    color: #d99b9b;
    font-size: 0.85rem;
    margin: 0;
}

/* Recovery Codes Alert */
.manage-recovery-alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.manage-recovery-alert.danger {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.manage-recovery-alert.warning {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.manage-recovery-alert strong {
    display: block;
    margin-bottom: 0.5rem;
}

.manage-recovery-alert.danger strong {
    color: #f87171;
}

.manage-recovery-alert.warning strong {
    color: #fbbf24;
}

.manage-recovery-alert p {
    margin: 0;
    font-size: 0.9rem;
}

.manage-recovery-alert.danger p {
    color: #fca5a5;
}

.manage-recovery-alert.warning p {
    color: #fde68a;
}

.manage-recovery-alert a {
    color: inherit;
    font-weight: 500;
    text-decoration: underline;
}

/* Authenticator Section */
.manage-authenticator-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #5f1515;
}

.manage-authenticator-section h4 {
    color: #ffdddd;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Personal Data Section */
.manage-personal-data {
    text-align: center;
    padding: 1rem 0;
}

.manage-personal-data p {
    color: #d99b9b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.manage-personal-data .warning-text {
    color: #f87171;
    font-weight: 500;
}

/* Divider */
.manage-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #d99b9b;
    font-size: 0.85rem;
}

.manage-divider::before,
.manage-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #5f1515;
}

.manage-divider span {
    padding: 0 1rem;
    white-space: nowrap;
}

/* Empty State */
.manage-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #9ca3af;
}

.manage-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.6;
}

.manage-empty h4 {
    color: #d99b9b;
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
}

.manage-empty p {
    font-size: 0.9rem;
    margin: 0;
}

/* ========================================
   Billing Module Styles
   ======================================== */

/* Page Container */
.billing-dashboard,
.billing-settings,
.billing-accounts,
.quote-management,
.invoice-management,
.billing-documents,
.billing-overview,
.billing-quotes,
.billing-invoices,
.billing-documents-upload {
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.billing-dashboard .page-header,
.billing-settings .page-header,
.billing-accounts .page-header,
.quote-management .page-header,
.invoice-management .page-header,
.billing-documents .page-header,
.billing-overview .page-header,
.billing-quotes .page-header,
.billing-invoices .page-header,
.billing-documents-upload .page-header {
    margin-bottom: 2rem;
}

.billing-dashboard .page-header h1,
.billing-settings .page-header h1,
.billing-accounts .page-header h1,
.quote-management .page-header h1,
.invoice-management .page-header h1,
.billing-documents .page-header h1,
.billing-overview .page-header h1,
.billing-quotes .page-header h1,
.billing-invoices .page-header h1,
.billing-documents-upload .page-header h1 {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffdddd;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.billing-dashboard .page-header h1 .bi,
.billing-overview .page-header h1 .bi,
.billing-accounts .page-header h1 .bi {
    font-size: 1.25em;
    opacity: 0.9;
}

/* Modern Cards Grid */
.modern-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.modern-card {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px dashed #5f1515;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.modern-card:hover {
    border-color: #7f1d1d;
    border-style: solid;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.modern-card.inactive {
    opacity: 0.7;
    border-color: #404040;
    background: linear-gradient(145deg, #2d2d2d, #252525);
}

.modern-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.3), rgba(95, 21, 21, 0.3));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modern-card-icon .bi {
    font-size: 1.5rem;
    color: #d99b9b;
}

.modern-card-content {
    flex: 1;
    min-width: 0;
}

.modern-card-content h3 {
    color: #ffdddd;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modern-card-stat {
    color: #34d399;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.modern-card-stat.text-muted {
    color: #888888;
}

.modern-card-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.modern-card-details span {
    color: #d99b9b;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.modern-card-details span strong {
    color: #888888;
    font-weight: 500;
}

.modern-card-details .status-highlight {
    color: #34d399;
    font-weight: 500;
}

.modern-card-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(127, 29, 29, 0.3);
    flex-wrap: wrap;
}

.modern-card-actions .btn {
    flex: 1;
    min-width: 80px;
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
}

.modern-card-actions .btn .bi {
    margin-right: 0.25rem;
}

/* Desktop: Horizontal card layout */
@media (min-width: 768px) {
    .modern-card {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .modern-card-actions {
        flex-direction: column;
        border-top: none;
        border-left: 1px solid rgba(127, 29, 29, 0.3);
        padding-top: 0;
        padding-left: 1rem;
        margin-left: auto;
    }
    
    .modern-card-actions .btn {
        min-width: 90px;
        white-space: nowrap;
    }
}

/* Billing Nav Cards */
.billing-nav-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.nav-card {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px dashed #5f1515;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: #7f1d1d;
    border-style: solid;
}

.nav-card:hover .nav-arrow {
    transform: translateX(4px);
    color: #ffdddd;
}

.nav-card .nav-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.3), rgba(95, 21, 21, 0.3));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-card .nav-icon .bi {
    font-size: 1.5rem;
    color: #d99b9b;
}

.nav-card .nav-content {
    flex: 1;
    min-width: 0;
}

.nav-card h3 {
    margin: 0 0 0.25rem;
    font-size: 1.125rem;
    color: #ffdddd;
}

.nav-card .nav-stat {
    color: #34d399;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.nav-card p {
    margin: 0;
    font-size: 0.8125rem;
    color: #d99b9b;
    line-height: 1.4;
}

.nav-card .nav-arrow {
    color: #d99b9b;
    font-size: 1.5rem;
    transition: transform 0.2s, color 0.2s;
    flex-shrink: 0;
}

.nav-card .badge {
    margin-top: 0.5rem;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.quick-stats .stat-card {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px dashed #5f1515;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s ease;
}

.quick-stats .stat-card:hover {
    border-color: #7f1d1d;
    transform: translateY(-2px);
}

.quick-stats .stat-card h3 {
    font-size: 1.5rem;
    margin: 0;
    color: #ffdddd;
}

.quick-stats .stat-card p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: #d99b9b;
}

.quick-stats .stat-card.text-success h3 {
    color: #34d399;
}

.quick-stats .stat-card.text-danger h3 {
    color: #ef4444;
}

/* Invoice Stats - Modern Card Design */
.invoice-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.invoice-stats .stat-card {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px dashed #5f1515;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s ease;
}

.invoice-stats .stat-card:hover {
    border-color: #7f1d1d;
    transform: translateY(-2px);
}

.invoice-stats .stat-card h4 {
    font-size: 1.5rem;
    margin: 0;
    color: #ffdddd;
}

.invoice-stats .stat-card p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: #d99b9b;
}

.invoice-stats .stat-card.text-success h4 {
    color: #34d399;
}

.invoice-stats .stat-card.text-danger h4 {
    color: #ef4444;
}

/* Document Stats - Modern Card Design */
.document-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.document-stats .stat-card {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px dashed #5f1515;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s ease;
}

.document-stats .stat-card:hover {
    border-color: #7f1d1d;
    transform: translateY(-2px);
}

.document-stats .stat-card h4 {
    font-size: 1.5rem;
    margin: 0;
    color: #ffdddd;
}

.document-stats .stat-card p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: #d99b9b;
}

.document-stats .stat-card.warning {
    border-left: 4px solid #ff9800;
    border-left-style: solid;
}

.document-stats .stat-card.warning h4 {
    color: #ff9800;
}

.document-stats .stat-card.danger {
    border-left: 4px solid #ef4444;
    border-left-style: solid;
}

.document-stats .stat-card.danger h4 {
    color: #ef4444;
}

.document-stats .stat-card.info {
    border-left: 4px solid #2196f3;
    border-left-style: solid;
}

.document-stats .stat-card.info h4 {
    color: #2196f3;
}

/* LogIX History Stats - Modern Card Design */
.history-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.history-stats .stat-card {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px dashed #5f1515;
    padding: 1.25rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s ease;
}

.history-stats .stat-card:hover {
    border-color: #7f1d1d;
    transform: translateY(-2px);
}

.history-stats .stat-card .stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffdddd;
    margin-bottom: 0.25rem;
}

.history-stats .stat-card .stat-label {
    font-size: 0.8rem;
    color: #d99b9b;
}

.history-stats .stat-card.text-success .stat-number {
    color: #34d399;
}

.history-stats .stat-card.text-warning .stat-number {
    color: #fbbf24;
}

.history-stats .stat-card.text-danger .stat-number {
    color: #ef4444;
}

/* LogIX Analytics Stats - Modern Card Design */
.stats-cards .stat-card {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px dashed #5f1515;
    padding: 1.25rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
}

.stats-cards .stat-card:hover {
    border-color: #7f1d1d;
    transform: translateY(-2px);
}

.stats-cards .stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stats-cards .stat-card .stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.stats-cards .stat-card .stat-percent {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* Override Bootstrap bg-* colors for stats cards */
.stats-cards .stat-card.bg-primary {
    background: linear-gradient(145deg, #3b0b0b, #4b1212) !important;
    border-left: 4px solid #3b82f6;
    border-left-style: solid;
}

.stats-cards .stat-card.bg-success {
    background: linear-gradient(145deg, #3b0b0b, #4b1212) !important;
    border-left: 4px solid #34d399;
    border-left-style: solid;
}

.stats-cards .stat-card.bg-warning {
    background: linear-gradient(145deg, #3b0b0b, #4b1212) !important;
    border-left: 4px solid #fbbf24;
    border-left-style: solid;
}

.stats-cards .stat-card.bg-danger {
    background: linear-gradient(145deg, #3b0b0b, #4b1212) !important;
    border-left: 4px solid #ef4444;
    border-left-style: solid;
}

.stats-cards .stat-card.text-white {
    color: #ffdddd !important;
}

.stats-cards .stat-card.text-dark {
    color: #ffdddd !important;
}

/* LogIX Status Badge - Missed with striped effect */
.badge-missed {
    background: repeating-linear-gradient(
        45deg,
        #ef4444,
        #ef4444 4px,
        #dc2626 4px,
        #dc2626 8px
    ) !important;
}

/* Account Summary Card */
.account-summary-card {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px dashed #5f1515;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.account-summary-card .summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #5f1515;
}

.account-summary-card .summary-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #ffdddd;
}

.account-summary-card .summary-details {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.account-summary-card .detail label {
    color: #888888;
    font-size: 0.8125rem;
    display: block;
    margin-bottom: 0.25rem;
}

.account-summary-card .detail span {
    color: #ffdddd;
    font-weight: 500;
}

/* Recent Activity */
.recent-activity {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px dashed #5f1515;
    border-radius: 12px;
    padding: 1.5rem;
}

.recent-activity h2 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: #ffdddd;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #5f1515;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px dashed #5f1515;
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: #7f1d1d;
    border-style: solid;
}

.summary-card .card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.3), rgba(95, 21, 21, 0.3));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.summary-card .card-icon .bi {
    font-size: 1.5rem;
    color: #d99b9b;
}

.summary-card .card-content {
    flex: 1;
    min-width: 0;
}

.summary-card .card-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #ffdddd;
}

.summary-card .card-content p {
    margin: 0.25rem 0;
    color: #d99b9b;
    font-size: 0.875rem;
}

.summary-card .card-link {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    color: #34d399;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.summary-card .card-link:hover {
    color: #4ade80;
}

.summary-card.alert {
    border-left: 4px solid #ef4444;
    border-left-style: solid;
}

.summary-card.attention {
    border-left: 4px solid #f97316;
    border-left-style: solid;
}

/* Dashboard Sections */
.dashboard-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.dashboard-section {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px dashed #5f1515;
    border-radius: 12px;
    padding: 1.5rem;
    transition: border-color 0.2s;
}

.dashboard-section:hover {
    border-color: #7f1d1d;
}

.dashboard-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #5f1515;
}

.dashboard-section .section-header h2 {
    font-size: 1.125rem;
    margin: 0;
    color: #ffdddd;
}

.dashboard-section .section-header .btn-outline-primary {
    color: #34d399;
    border-color: #34d399;
}

.dashboard-section .section-header .btn-outline-primary:hover {
    background: rgba(52, 211, 153, 0.1);
    color: #4ade80;
}

/* Toolbar */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Empty State */
.billing-accounts .empty-state,
.billing-overview .empty-state {
    text-align: center;
    padding: 3rem;
    color: #d99b9b;
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px dashed #5f1515;
    border-radius: 12px;
    grid-column: 1 / -1;
}

.billing-accounts .empty-state .bi,
.billing-overview .empty-state .bi {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.5;
    color: #d99b9b;
}

/* Desktop/Mobile Table/Card Toggle - Base Styles */
.mobile-card-list {
    display: none;
}

.desktop-table {
    display: block;
}

/* Mobile Card List - Media Query */
@media (max-width: 576px) {
    .mobile-card-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .desktop-table {
        display: none;
    }
    
    .mobile-card-item {
        background: linear-gradient(145deg, #3b0b0b, #4b1212);
        border: 1px dashed #5f1515;
        border-radius: 12px;
        padding: 1rem;
        transition: all 0.2s;
        cursor: pointer;
    }
    
    .mobile-card-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        border-color: #7f1d1d;
    }
    
    .mobile-card-item.status-overdue {
        border-left: 4px solid #ef4444;
        border-left-style: solid;
    }
    
    .mobile-card-item .card-header-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid #5f1515;
        gap: 0.5rem;
    }
    
    .mobile-card-item .card-title {
        font-weight: 600;
        color: #ffdddd;
        font-size: 1rem;
    }
    
    .mobile-card-item .card-subtitle {
        color: #d99b9b;
        font-size: 0.8125rem;
        margin-top: 0.25rem;
    }
    
    .mobile-card-item .card-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.25rem 0;
    }
    
    .mobile-card-item .card-label {
        color: #888888;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }
    
    .mobile-card-item .card-value {
        color: #ffdddd;
        font-weight: 500;
        font-size: 0.9375rem;
    }
    
    /* Nav cards mobile */
    .billing-nav-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .nav-card {
        padding: 1rem;
    }
    
    .nav-card .nav-icon {
        width: 40px;
        height: 40px;
    }
    
    .nav-card .nav-icon .bi {
        font-size: 1.25rem;
    }
    
    /* Quick stats mobile */
    .quick-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .quick-stats .stat-card {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: 1rem;
    }
    
    .quick-stats .stat-card h3 {
        font-size: 1.25rem;
        order: 2;
    }
    
    .quick-stats .stat-card p {
        margin: 0;
        order: 1;
    }
    
    /* Summary cards mobile */
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    /* Modern cards mobile */
    .modern-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modern-card {
        padding: 1rem;
    }
    
    .modern-card-icon {
        width: 40px;
        height: 40px;
    }
    
    .modern-card-icon .bi {
        font-size: 1.25rem;
    }
    
    /* Dashboard sections mobile */
    .dashboard-sections {
        grid-template-columns: 1fr;
    }
    
    /* Account summary mobile */
    .account-summary-card .summary-details {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    /* Quote/Invoice detail mobile */
    .quote-info-grid,
    .invoice-info-grid {
        grid-template-columns: 1fr;
    }
    
    .quote-detail .detail-header,
    .invoice-detail .detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .quote-detail .detail-header h2,
    .invoice-detail .detail-header h2 {
        font-size: 1.25rem;
    }
    
    .quote-actions,
    .invoice-actions {
        flex-direction: column;
    }
    
    .quote-actions .btn,
    .invoice-actions .btn {
        width: 100%;
    }
    
    .quote-response-section .response-buttons {
        flex-direction: column;
    }
    
    .quote-response-section .response-buttons .btn {
        width: 100%;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .billing-dashboard,
    .billing-settings,
    .billing-accounts,
    .quote-management,
    .invoice-management,
    .billing-documents,
    .billing-overview,
    .billing-quotes,
    .billing-invoices,
    .billing-documents-upload {
        padding: 1rem;
    }
    
    .modern-card {
        flex-direction: column;
    }
    
    .modern-card-actions {
        flex-direction: row;
        border-left: none;
        border-top: 1px solid rgba(127, 29, 29, 0.3);
        padding-left: 0;
        padding-top: 1rem;
        margin-left: 0;
    }
    
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar .btn {
        width: 100%;
    }
}

/* Quote/Invoice Detail Views */
.quote-detail,
.invoice-detail {
    padding-bottom: 2rem;
}

.quote-detail .detail-header,
.invoice-detail .detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px dashed #5f1515;
    border-radius: 12px;
    padding: 1.5rem;
}

.quote-detail .detail-header h2,
.invoice-detail .detail-header h2 {
    font-size: 1.5rem;
    margin: 0;
    color: #ffdddd;
    flex: 1;
}

.quote-detail .detail-header .btn-outline-secondary,
.invoice-detail .detail-header .btn-outline-secondary {
    color: #d99b9b;
    border-color: #5f1515;
}

.quote-detail .detail-header .btn-outline-secondary:hover,
.invoice-detail .detail-header .btn-outline-secondary:hover {
    background: rgba(127, 29, 29, 0.2);
    border-color: #7f1d1d;
    color: #ffdddd;
}

/* Info Cards Grid */
.quote-info-grid,
.invoice-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Info Card - Modern Style */
.info-card {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px dashed #5f1515;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.info-card:hover {
    border-color: #7f1d1d;
}

.info-card h4 {
    font-size: 0.75rem;
    color: #d99b9b;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #5f1515;
}

.info-card p {
    margin: 0.5rem 0;
    color: #ffdddd;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.info-card p strong {
    color: #d99b9b;
    font-weight: 500;
}

.info-card.totals {
    background: linear-gradient(145deg, #2d0808, #3b0b0b);
    border-color: #7f1d1d;
}

.info-card.totals .total {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid #5f1515;
    color: #34d399;
}

.info-card.totals .balance {
    font-size: 1.125rem;
    font-weight: 600;
}

.info-card.totals .paid {
    color: #34d399;
}

/* Line Items Section */
.line-items-section {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px dashed #5f1515;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: border-color 0.2s;
}

.line-items-section:hover {
    border-color: #7f1d1d;
}

.line-items-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #5f1515;
}

.line-items-section h3 {
    font-size: 1.125rem;
    margin: 0;
    color: #ffdddd;
}

/* Payments Section */
.payments-section,
.payment-history {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px dashed #5f1515;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: border-color 0.2s;
}

.payments-section:hover,
.payment-history:hover {
    border-color: #7f1d1d;
}

.payments-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #5f1515;
}

.payments-section h3,
.payment-history h3 {
    margin: 0 0 1rem;
    color: #ffdddd;
    font-size: 1.125rem;
}

/* Quote Description */
.quote-description {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px dashed #5f1515;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: border-color 0.2s;
}

.quote-description:hover {
    border-color: #7f1d1d;
}

.quote-description h4 {
    font-size: 0.75rem;
    color: #d99b9b;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #5f1515;
}

.quote-description p {
    color: #ffdddd;
    margin: 0;
    line-height: 1.6;
}

/* PO Info / Confirmation */
.po-info,
.po-confirmation {
    background: linear-gradient(145deg, rgba(52, 211, 153, 0.1), rgba(52, 211, 153, 0.05));
    border: 1px dashed rgba(52, 211, 153, 0.4);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    transition: border-color 0.2s;
}

.po-info:hover,
.po-confirmation:hover {
    border-color: #34d399;
}

.po-info h4,
.po-confirmation h4 {
    color: #34d399;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.po-info p,
.po-confirmation p {
    color: #d99b9b;
    margin: 0.5rem 0;
}

.po-info p strong,
.po-confirmation p strong {
    color: #ffdddd;
}

/* Quote Response Section */
.quote-response-section {
    background: linear-gradient(145deg, rgba(249, 115, 22, 0.1), rgba(249, 115, 22, 0.05));
    border: 1px dashed rgba(249, 115, 22, 0.4);
    border-left: 4px solid #f97316;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    transition: border-color 0.2s;
}

.quote-response-section:hover {
    border-color: #f97316;
}

.quote-response-section h3 {
    margin-bottom: 1.25rem;
    color: #ffdddd;
    font-size: 1.125rem;
}

.quote-response-section .response-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Payment Instructions Card */
.payment-instructions-card {
    background: linear-gradient(145deg, rgba(96, 165, 250, 0.1), rgba(96, 165, 250, 0.05));
    border: 1px dashed rgba(96, 165, 250, 0.4);
    border-left: 4px solid #60a5fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: border-color 0.2s;
}

.payment-instructions-card:hover {
    border-color: #60a5fa;
}

.payment-instructions-card h4 {
    color: #60a5fa;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.payment-instructions-card .payment-method {
    margin-bottom: 1.5rem;
}

.payment-instructions-card .payment-method h5 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #ffdddd;
}

.payment-instructions-card .payment-method p {
    color: #d99b9b;
    margin: 0.5rem 0;
}

.payment-instructions-card .payment-method p strong {
    color: #ffdddd;
}

.payment-instructions-card .payment-method address {
    color: #d99b9b;
    font-style: normal;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

/* Quote/Invoice Actions */
.quote-actions,
.invoice-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Recurring Info */
.recurring-info {
    margin-bottom: 1.5rem;
}

/* Upload Section */
.upload-section {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px dashed #5f1515;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: border-color 0.2s;
}

.upload-section:hover {
    border-color: #7f1d1d;
}

.upload-section h2 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #5f1515;
    color: #ffdddd;
}

.upload-section .upload-form .form-label {
    color: #d99b9b;
    font-size: 0.875rem;
}

/* Documents List */
.documents-list {
    margin-top: 2rem;
}

.documents-list h2 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: #ffdddd;
}

/* Documents Grid */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Document Card */
.document-card {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px dashed #5f1515;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.document-card:hover {
    transform: translateY(-2px);
    border-color: #7f1d1d;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.document-card.needs-review {
    border-left: 4px solid #f97316;
    border-left-style: solid;
}

.document-card.expired {
    border-left: 4px solid #ef4444;
    border-left-style: solid;
    opacity: 0.8;
}

.document-card.expiring-soon {
    border-left: 4px solid #f97316;
    border-left-style: solid;
}

.document-card .document-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #5f1515;
}

.document-card .document-type-icon,
.document-card .document-icon {
    font-size: 2rem;
    color: #d99b9b;
}

.document-card .document-title {
    flex: 1;
}

.document-card .document-title h4 {
    margin: 0;
    font-size: 1rem;
    color: #ffdddd;
}

.document-card .document-title .document-type,
.document-card .document-info .document-type {
    font-size: 0.75rem;
    color: #d99b9b;
}

.document-card .document-body {
    margin-bottom: 1rem;
}

.document-card .document-body .document-detail {
    display: flex;
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
}

.document-card .document-body .document-detail label {
    width: 80px;
    color: #888888;
    flex-shrink: 0;
}

.document-card .document-body .document-detail span {
    color: #d99b9b;
}

.document-card .document-info {
    flex: 1;
}

.document-card .document-info h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    color: #ffdddd;
}

.document-card .document-info .document-date {
    font-size: 0.8125rem;
    color: #888888;
    margin: 0 0 0.25rem;
}

.document-card .document-info .expiration {
    font-size: 0.8125rem;
    color: #d99b9b;
    margin: 0.5rem 0;
}

.document-card .document-info .expiration .badge {
    margin-right: 0.5rem;
}

.document-card .document-info .description {
    font-size: 0.8125rem;
    color: #888888;
    margin: 0.5rem 0 0;
    font-style: italic;
}

.document-card .document-status {
    margin: 1rem 0;
}

.document-card .document-footer,
.document-card .document-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #5f1515;
}

.document-card .review-info {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #5f1515;
}

.document-card .review-info small {
    color: #888888;
}

.document-card .review-info .review-notes {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #d99b9b;
}

/* Settings Sections */
.settings-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Settings Card */
.settings-card {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border: 1px dashed #5f1515;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.settings-card:hover {
    border-color: #7f1d1d;
}

.settings-card .settings-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid #5f1515;
    background: rgba(0, 0, 0, 0.1);
}

.settings-card .settings-card-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.3), rgba(95, 21, 21, 0.3));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.settings-card .settings-card-icon .bi {
    font-size: 1.25rem;
    color: #d99b9b;
}

.settings-card .settings-card-header h2 {
    font-size: 1.125rem;
    margin: 0;
    color: #ffdddd;
    font-weight: 600;
}

.settings-card .settings-card-body {
    padding: 1.5rem;
}

.settings-card .settings-card-body .form-label {
    color: #d99b9b;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #3b0b0b 25%, #4b1212 50%, #3b0b0b 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite ease-in-out;
    border-radius: 6px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.skeleton-stat-card {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border-radius: 12px;
    padding: 1.5rem;
}

.skeleton-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skeleton-card {
    background: linear-gradient(145deg, #3b0b0b, #4b1212);
    border-radius: 12px;
    padding: 1.5rem;
}


