body {
    font-family: 'Poppins', sans-serif;
    background: #f4f6f9;
    margin: 0;
    padding: 0;
}

:root {
    --theme-primary: #5843CF;
    --theme-primary-dark: #4633B2;
    --theme-primary-soft: rgba(88,67,207,0.2);
}

.container {
    max-width: 1200px;
    margin: 28px auto;
    background: #fff;
    border-radius: 12px;
    padding: 25px 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.page-header {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #eaeaea;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.page-header-logo-wrap {
    display: flex;
    align-items: center;
}

.page-header-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.page-header-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.page-header-line-1 {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    max-width: 640px;
}

.page-header-line-2 {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    max-width: 640px;
}

.page-header-divider {
    color: #999;
    font-size: 12px;
}

.page-header-company {
    font-size: 13px;
    font-weight: 700;
    color: #222;
    text-align: right;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-header-branch {
    font-size: 12px;
    font-weight: 600;
    color: var(--theme-primary);
    text-align: right;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-header-meta {
    font-size: 11px;
    color: #666;
    text-align: right;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

h2 {
    font-size: 26px;
    text-align: center;
    margin-bottom: 18px;
    color: #333;
}

.section-title {
    margin: 14px 0 8px;
    font-weight: 600;
    color: #444;
    grid-column: 1 / -1;
}

.form-group {
    margin-bottom: 10px;
}

.fields-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 16px;
    align-items: center;
}

.contact-inline-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 16px;
    align-items: center;
}

label {
    font-size: 13px;
    color: #555;
    margin-bottom: 5px;
    display: block;
}

input {
    width: 100%;
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: 0.3s;
}

    input:focus {
        border-color: var(--theme-primary);
        outline: none;
        box-shadow: 0 0 0 2px var(--theme-primary-soft);
    }

/* Tabs */
.tabs {
    display: flex;
    margin-top: 14px;
    border-bottom: 2px solid #eee;
    gap: 2px;
}

.tab {
    font-size: 14px;
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 500;
    color: #777;
    border-bottom: 3px solid transparent;
    transition: 0.3s;
    white-space: nowrap;
}

    .tab.active {
        color: var(--theme-primary);
        border-bottom: 3px solid var(--theme-primary);
    }

.tab-content {
    display: none;
    margin-top: 10px;
    animation: fadeIn 0.3s ease-in-out;
}

    .tab-content.active {
        display: block;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn {
    width: 100%;
    padding: 12px;
    color: #fff;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s;
}

.address-actions .btn {
    width: auto;
    padding: 6px 10px;
}

.address-actions .btn.btn-sm {
    padding: 4px 10px;
}

.btn.submit-registration-btn {
    margin-top: 16px;
    color: var(--theme-primary) !important;
    background-color: white !important;
    border: 1px solid var(--theme-primary);
}

    .btn.dropdown-toggle {
        color: #1c1c1c;
    }

    .btn.submit-registration-btn:hover {
        background-color: var(--theme-primary) !important;
        border-color: var(--theme-primary) !important;
        border: 1px solid var(--theme-primary);
        color: white !important;
    }

    .add-btn {
        border: 1px solid var(--theme-primary);
        color: var(--theme-primary) !important;
        font-size: 14px;
        padding: 6px 10px;
    }

    .add-btn:hover {
        background-color: var(--theme-primary) !important;
        border-color: var(--theme-primary) !important;
        border: 1px solid var(--theme-primary);
        color: white !important;
    }

    .clear-btn {
        border: 1px solid gray;
        color: gray !important;
        font-size: 14px;
        padding: 6px 10px;
    }
        .clear-btn:hover {
            color: white !important;
        }

.file-input {
    padding: 8px;
    background: #fafafa;
}

.bootstrap-select,
.bootstrap-select > .dropdown-toggle {
    width: 100% !important;
}

.bootstrap-select .dropdown-menu {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100%;
}

.bootstrap-select .dropdown-menu .inner {
    max-width: 100%;
}

.bootstrap-select .dropdown-menu li a span.text {
    white-space: normal;
    word-break: break-word;
}

.required-star-mark {
    color: #d93025;
    margin-left: 2px;
    font-weight: 600;
}

.address-icon-btn {
    border: 0;
    background: transparent;
    padding: 4px 6px;
    line-height: 0;
    color: #6f63ff;
    cursor: pointer;
    border-radius: 4px;
}

.address-icon-btn:hover {
    color: #5b4dff;
    background: rgba(111, 99, 255, 0.08);
}

.address-icon-btn.address-icon-danger {
    color: #ff6b81;
}

.address-icon-btn.address-icon-danger:hover {
    color: #ff4d67;
    background: rgba(255, 107, 129, 0.1);
}

.address-icon-btn svg {
    display: block;
}

#AddressListTable {
    margin: 0;
}

    #AddressListTable thead th {
        color: #5a46eb;
        font-size: clamp(12px, 3vw, 14px);
        font-weight: 600;
        background: #f6f4ff;
        border-color: #dde3ef;
        padding: 10px;
    }

#AddressListBody td {
    font-size: clamp(12px, 3vw, 14px);
    color: #455472;
    border-color: #dde3ef;
    vertical-align: middle;
    padding: 9px 10px;
    background: #fff;
    white-space: nowrap;
}

#AddressListBody tr:nth-child(odd) td {
    background: #f8f9fd;
}

.default-address-check {
    width: 16px;
    height: 16px;
    cursor: default;
    pointer-events: none;
}

#registrationMessageModal .modal-dialog {
    max-width: 430px;
}

#registrationMessageModal .modal-content {
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(25, 35, 58, 0.18);
}

#registrationMessageModal .modal-header {
    border-bottom: 0;
    padding: 14px 18px 8px;
    background: linear-gradient(135deg, #f4f7ff 0%, #edf2ff 100%);
}

#registrationMessageModal .modal-title {
    font-size: 17px;
    font-weight: 600;
    color: #2f3f67;
    display: flex;
    align-items: center;
    gap: 8px;
}

#registrationMessageModal .modal-title::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6f63ff;
    box-shadow: 0 0 0 4px rgba(111, 99, 255, 0.15);
}

#registrationMessageModal .close {
    opacity: 0.75;
    color: #6b7695;
    text-shadow: none;
}

#registrationMessageModal .close:hover {
    opacity: 1;
    color: #36486f;
}

#registrationMessageModal .modal-body {
    padding: 14px 18px 8px;
    color: #455472;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
}

#registrationMessageModal .modal-footer {
    border-top: 0;
    padding: 10px 18px 16px;
    justify-content: flex-end;
}

#registrationMessageModal .btn-primary {
    border-radius: 8px;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 600;
    background: #6f63ff;
    border-color: #6f63ff;
}

#registrationMessageModal .btn-primary:hover {
    background: #5b4dff;
    border-color: #5b4dff;
}

.doc-upload-zone {
    border: 1px dashed #7a79ff;
    border-radius: 12px;
    background: #f5f6fb;
    min-height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    cursor: pointer;
}

.doc-upload-zone.is-dragover {
    background: #eef1ff;
    border-color: #5b4dff;
}

.doc-upload-zone-icon {
    font-size: 40px;
    color: #5b4dff;
    line-height: 1;
    margin-bottom: 8px;
}

.doc-upload-zone-text {
    color: #7b89a7;
    font-size: 15px;
}

.doc-table-wrap {
    margin-top: 14px;
    background: #fff;
    border: 1px solid #d7dee9;
    border-radius: 10px;
    overflow-x: auto;
    overflow-y: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cfd7e8 #f4f6fb;
}

.doc-table-wrap::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.doc-table-wrap::-webkit-scrollbar-track {
    background: #f4f6fb;
    border-radius: 999px;
}

.doc-table-wrap::-webkit-scrollbar-thumb {
    background: #cfd7e8;
    border-radius: 999px;
}

.doc-table-wrap::-webkit-scrollbar-thumb:hover {
    background: #dee4f0;
}

#DocumentListTable {
    margin: 0;
    table-layout: fixed;
    width: 100%;
}

    #DocumentListTable thead th:nth-child(2),
    #DocumentListBody td:nth-child(2) {
        max-width: 36%;
        overflow: hidden;
    }

    #DocumentListTable thead th {
        color: #5a46eb;
        font-size: clamp(12px, 3vw, 14px);
        font-weight: 600;
        background: #f6f4ff;
        border-color: #dde3ef;
        padding: 10px;
    }

#DocumentListBody td {
    color: #455472;
    font-size: clamp(12px, 3vw, 14px);
    border-color: #dde3ef;
    vertical-align: middle;
    padding: 9px 10px;
    background: #fff;
}

#DocumentListBody tr:nth-child(odd) td {
    background: #f8f9fd;
}

.doc-file-name {
    display: block;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-delete-btn {
    border: 0;
    background: transparent;
    color: #ff6b81;
    padding: 2px 6px;
}

.doc-delete-btn:hover {
    color: #ff4d67;
    background: rgba(255, 107, 129, 0.1);
    border-radius: 4px;
}

.doc-upload-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
}

.doc-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: #eceaf6;
    color: #4a4f67;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    padding: 7px 14px;
    line-height: 1;
}

.doc-upload-btn:hover {
    background: #e4e1f5;
    color: #3f4661;
}

.doc-upload-btn svg {
    width: 18px;
    height: 18px;
}

@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

@media (max-width: 991.98px) {
    .container {
        max-width: 94%;
        padding: 18px 18px;
    }

    .fields-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-inline-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tab {
        padding: 11px 16px;
    }

    #AddressListTable {
        min-width: 980px;
    }

    #DocumentListTable {
        min-width: 820px;
    }
}

@media (max-width: 767.98px) {
    .page-header {
        padding: 8px 14px;
        align-items: flex-start;
    }

    .page-header-logo {
        width: 36px;
        height: 36px;
    }

    .page-header-details {
        max-width: calc(100% - 52px);
        align-items: flex-end;
    }

    .page-header-company {
        font-size: 12px;
        max-width: 100%;
    }

    .page-header-branch {
        font-size: 12px;
        max-width: 100%;
    }

    .page-header-line-1,
    .page-header-line-2 {
        max-width: 100%;
        gap: 6px;
    }

    .page-header-line-2 {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .page-header-meta {
        font-size: 11px;
        max-width: 100%;
    }

    .container {
        margin: 14px auto;
        padding: 14px 12px;
        border-radius: 10px;
    }

    .fields-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .contact-inline-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tabs {
        overflow-x: auto;
        white-space: nowrap;
    }

    .tab {
        flex: 0 0 auto;
        padding: 10px 14px;
    }

    .bootstrap-select .dropdown-menu {
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
    }
}

@media (max-width: 575.98px) {
    .container {
        margin: 10px auto;
        padding: 12px 10px;
    }

    h2 {
        font-size: 18px;
        margin-bottom: 18px;
    }

    label {
        font-size: 12px;
    }

    input,
    .btn.dropdown-toggle,
    .btn.submit-registration-btn {
        font-size: 13px;
    }
}