/* ================================================================
   CORPORATE INDEX — COMPLETE STYLES
   ================================================================ */

/* ── HERO ─────────────────────────────────────────────────────── */
.corp-hero {
    background: linear-gradient(135deg, #007bff 0%, #0056cc 100%);
    border-radius: 16px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: 0 4px 20px rgba(0,123,255,.25);
    color: #fff;
}

.corp-hero-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.corp-hero-icon {
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.corp-hero-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.corp-hero-sub {
    font-size: .85rem;
    opacity: .85;
    margin: 0;
}

.btn-corp-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #007bff;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: .88rem;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    transition: transform .15s, box-shadow .15s;
}

    .btn-corp-add:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0,0,0,.18);
        color: #0056cc;
    }

/* ── STAT CARDS ──────────────────────────────────────────────── */
.corp-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
}

.cstat {
    background: #fff;
    border-radius: 14px;
    padding: 1.4rem 1.5rem 1rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: cstatIn 0.5s ease both;
}

    .cstat:nth-child(1) {
        animation-delay: 0.05s;
    }

    .cstat:nth-child(2) {
        animation-delay: 0.10s;
    }

    .cstat:nth-child(3) {
        animation-delay: 0.15s;
    }

    .cstat:nth-child(4) {
        animation-delay: 0.20s;
    }

@keyframes cstatIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cstat:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.1);
}

.cstat-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0 0 0.35rem;
    opacity: 0.65;
}

.cstat-value {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0;
    line-height: 1;
}

.cstat-hint {
    font-size: 0.78rem;
    margin: 0.35rem 0 0;
    opacity: 0.55;
}

.cstat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    opacity: 0.85;
}

.cstat-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 0 0 14px 14px;
}

/* Blue */
.cstat-blue .cstat-label,
.cstat-blue .cstat-value,
.cstat-blue .cstat-hint {
    color: #007bff;
}

.cstat-blue .cstat-icon {
    background: rgba(0,123,255,0.12);
    color: #007bff;
}

.cstat-blue .cstat-bar {
    background: linear-gradient(90deg,#007bff,#66b2ff);
}

/* Green */
.cstat-green .cstat-label,
.cstat-green .cstat-value,
.cstat-green .cstat-hint {
    color: #28a745;
}

.cstat-green .cstat-icon {
    background: rgba(40,167,69,0.12);
    color: #28a745;
}

.cstat-green .cstat-bar {
    background: linear-gradient(90deg,#28a745,#81d498);
}

/* Orange */
.cstat-orange .cstat-label,
.cstat-orange .cstat-value,
.cstat-orange .cstat-hint {
    color: #fd7e14;
}

.cstat-orange .cstat-icon {
    background: rgba(253,126,20,0.12);
    color: #fd7e14;
}

.cstat-orange .cstat-bar {
    background: linear-gradient(90deg,#fd7e14,#ffc17b);
}

/* Purple */
.cstat-purple .cstat-label,
.cstat-purple .cstat-value,
.cstat-purple .cstat-hint {
    color: #6f42c1;
}

.cstat-purple .cstat-icon {
    background: rgba(111,66,193,0.12);
    color: #6f42c1;
}

.cstat-purple .cstat-bar {
    background: linear-gradient(90deg,#6f42c1,#b899f8);
}

/* ── ERROR ALERT ──────────────────────────────────────────────── */
.corp-alert-error {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff5f5;
    border: 1.5px solid #f8d7da;
    border-left: 4px solid #dc3545;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    color: #721c24;
    font-weight: 500;
}

.corp-alert-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #721c24;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

    .corp-alert-close:hover {
        opacity: 1;
    }

/* ── MAIN CARD ────────────────────────────────────────────────── */
.corp-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    overflow: hidden;
}

.corp-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.5rem;
    border-bottom: 2px solid #f0f2f5;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.corp-card-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
}

.corp-card-title-dot {
    width: 10px;
    height: 10px;
    background: #007bff;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.2);
}

.corp-count-badge {
    background: rgba(0,123,255,0.1);
    color: #007bff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}

/* ── TOOLBAR ──────────────────────────────────────────────────── */
.corp-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.corp-search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.corp-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.corp-search-ico {
    position: absolute;
    left: 0.875rem;
    color: #adb5bd;
    font-size: 0.8rem;
    pointer-events: none;
}

.corp-search-input {
    padding: 0.5rem 2.25rem 0.5rem 2.25rem;
    border: 1.5px solid #e0e4ea;
    border-radius: 10px;
    font-size: 0.875rem;
    width: 240px;
    background: #f8f9fc;
    outline: none;
    transition: all 0.25s ease;
    color: #1a1a1a;
}

    .corp-search-input:focus {
        border-color: #007bff;
        background: #fff;
        box-shadow: 0 0 0 3px rgba(0,123,255,0.12);
        width: 280px;
    }

.corp-search-clear {
    position: absolute;
    right: 0.625rem;
    color: #adb5bd;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
}

    .corp-search-clear:hover {
        color: #dc3545;
    }

.corp-search-btn {
    padding: 0.5rem 0.9rem;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

    .corp-search-btn:hover {
        background: #0056b3;
        transform: scale(1.05);
    }

.corp-tool-btn {
    width: 36px;
    height: 36px;
    border: 1.5px solid #e0e4ea;
    background: #f8f9fc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.25s ease;
}

    .corp-tool-btn:hover {
        border-color: #007bff;
        color: #007bff;
        background: rgba(0,123,255,0.06);
    }

/* ── TABLE ────────────────────────────────────────────────────── */
.corp-card-body {
    padding: 0;
}

.corp-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .corp-table thead th {
        background: #f8f9fc;
        padding: 0.85rem 1.25rem;
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.7px;
        color: #8a94a6;
        border-bottom: 2px solid #f0f2f5;
        white-space: nowrap;
    }

        .corp-table thead th:first-child {
            border-radius: 0;
        }

.corp-row {
    animation: rowIn 0.4s ease both;
    transition: background 0.2s ease;
}

@keyframes rowIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.corp-row:hover {
    background: #f4f7ff;
}

.corp-table tbody td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
    font-size: 0.9rem;
    color: #2d3748;
}

.corp-table tbody tr:last-child td {
    border-bottom: none;
}

/* Row ID */
.corp-row-id {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #f0f2f5;
    border-radius: 7px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #8a94a6;
}

/* Avatar */
.corp-company-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.corp-avatar {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.corp-company-info {
    display: flex;
    flex-direction: column;
}

.corp-company-name {
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
}

.corp-company-id {
    font-size: 0.72rem;
    color: #adb5bd;
}

/* Domain */
.corp-domain-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #007bff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

    .corp-domain-link:hover {
        color: #0056b3;
        text-decoration: underline;
    }

.corp-domain-icon {
    width: 24px;
    height: 24px;
    background: rgba(0,123,255,0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #007bff;
}

.corp-domain-ext {
    font-size: 0.65rem;
    opacity: 0.5;
}

.corp-no-domain {
    color: #c0c8d8;
    font-size: 0.82rem;
    font-style: italic;
}

/* Dates */
.corp-date-cell {
    display: flex;
    flex-direction: column;
}

.corp-date-main {
    font-weight: 500;
    color: #2d3748;
    font-size: 0.875rem;
}

.corp-date-time {
    font-size: 0.72rem;
    color: #adb5bd;
}

/* Status */
.corp-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.corp-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.corp-status-active {
    background: rgba(40,167,69,0.1);
    color: #1e7e34;
}

    .corp-status-active .corp-status-dot {
        background: #28a745;
        box-shadow: 0 0 0 2px rgba(40,167,69,0.3);
        animation: pulse 2s infinite;
    }

.corp-status-new {
    background: rgba(0,123,255,0.1);
    color: #0056b3;
}

    .corp-status-new .corp-status-dot {
        background: #007bff;
    }

@keyframes pulse {
    0%,100% {
        box-shadow: 0 0 0 2px rgba(40,167,69,0.3);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(40,167,69,0.15);
    }
}

/* Action Buttons */
.corp-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.corp-btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

.corp-btn-view {
    background: rgba(23,162,184,0.1);
    color: #17a2b8;
}

.corp-btn-edit {
    background: rgba(253,126,20,0.1);
    color: #fd7e14;
}

.corp-btn-delete {
    background: rgba(220,53,69,0.1);
    color: #dc3545;
}

.corp-btn-view:hover {
    background: #17a2b8;
    color: #fff;
    transform: scale(1.15);
}

.corp-btn-edit:hover {
    background: #fd7e14;
    color: #fff;
    transform: scale(1.15);
}

.corp-btn-delete:hover {
    background: #dc3545;
    color: #fff;
    transform: scale(1.15);
}

/* ── ACTION DROPDOWN ──────────────────────────────────────────── */
.corp-btn-more {
    background: #f0f2f5;
    color: #6c757d;
    border: 1.5px solid #e0e4ea;
}

    .corp-btn-more:hover,
    .corp-btn-more.show {
        background: #007bff;
        color: #fff;
        border-color: #007bff;
        transform: scale(1.1);
    }

    .corp-btn-more::after {
        display: none; /* hide Bootstrap caret */
    }

.corp-action-menu {
    min-width: 170px;
    border: 1.5px solid #e8ecf2;
    border-radius: 12px;
    padding: 0.4rem;
    background: #fff;
    list-style: none;
}

.corp-action-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #2d3748;
    transition: background 0.15s ease, color 0.15s ease;
}

    .corp-action-item:hover {
        background: #f4f7ff;
        color: #007bff;
    }

.corp-action-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.corp-action-icon--view {
    background: rgba(23,162,184,0.12);
    color: #17a2b8;
}

.corp-action-icon--edit {
    background: rgba(253,126,20,0.12);
    color: #fd7e14;
}

.corp-action-item:hover .corp-action-icon--view {
    background: rgba(23,162,184,0.22);
}

.corp-action-item:hover .corp-action-icon--edit {
    background: rgba(253,126,20,0.22);
}

/* TABLE FOOTER */
.corp-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.5rem;
    background: #fafbfd;
    border-top: 1.5px solid #f0f2f5;
}

.corp-count-text {
    font-size: 0.82rem;
    color: #8a94a6;
}

.corp-footer-dots {
    display: flex;
    gap: 0.3rem;
}

.corp-footer-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e0e4ea;
}

    .corp-footer-dot.active {
        background: #007bff;
    }

/* ── EMPTY STATE ──────────────────────────────────────────────── */
.corp-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.corp-empty-illustration {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}

    .corp-empty-illustration i {
        position: relative;
        z-index: 1;
        font-size: 2rem;
        color: #007bff;
        width: 80px;
        height: 80px;
        background: rgba(0,123,255,0.08);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

.corp-empty-rings span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    border: 1.5px solid rgba(0,123,255,0.2);
    border-radius: 50%;
    animation: ringPulse 2s ease-in-out infinite;
}

    .corp-empty-rings span:nth-child(1) {
        width: 80px;
        height: 80px;
        animation-delay: 0s;
    }

    .corp-empty-rings span:nth-child(2) {
        width: 100px;
        height: 100px;
        animation-delay: 0.4s;
    }

    .corp-empty-rings span:nth-child(3) {
        width: 120px;
        height: 120px;
        animation-delay: 0.8s;
    }

@keyframes ringPulse {
    0%,100% {
        opacity: 0.4;
        transform: translate(-50%,-50%) scale(1);
    }

    50% {
        opacity: 0;
        transform: translate(-50%,-50%) scale(1.1);
    }
}

.corp-empty-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.corp-empty-text {
    color: #8a94a6;
    font-size: 0.9rem;
}

/* ── DELETE MODAL ─────────────────────────────────────────────── */
.corp-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(4px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

    .corp-modal-backdrop.show {
        opacity: 1;
        pointer-events: all;
    }

.corp-modal {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    width: 380px;
    max-width: 92vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    transform: scale(0.88) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

    .corp-modal.show {
        transform: scale(1) translateY(0);
    }

.corp-modal-icon {
    width: 68px;
    height: 68px;
    background: rgba(220,53,69,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #dc3545;
    margin: 0 auto 1.25rem;
}

.corp-modal-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: #1a1a1a;
    margin-bottom: 0.65rem;
}

.corp-modal-text {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.6;
}

.corp-modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.75rem;
    justify-content: center;
}

.corp-modal-cancel {
    padding: 0.65rem 1.5rem;
    border: 2px solid #dee2e6;
    background: #fff;
    color: #6c757d;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

    .corp-modal-cancel:hover {
        border-color: #6c757d;
        color: #343a40;
    }

.corp-modal-confirm {
    padding: 0.65rem 1.5rem;
    background: linear-gradient(135deg,#dc3545,#c82333);
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(220,53,69,0.3);
}

    .corp-modal-confirm:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(220,53,69,0.4);
        color: #fff;
    }
/* ================================================================
   CREATE FORM — MODERN FLOATING-LABEL STYLES
   ================================================================ */

/* ── Section Card ────────────────────────────────────────────── */
.cf-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    overflow: hidden;
    animation: cfSlideIn .4s ease both;
}

    .cf-section:nth-child(1) {
        animation-delay: .05s;
    }

    .cf-section:nth-child(2) {
        animation-delay: .12s;
    }

@keyframes cfSlideIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cf-section-header {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1.1rem 1.4rem;
    border-bottom: 2px solid #f0f2f5;
    background: #fafbfd;
}

.cf-section-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.cf-icon-blue {
    background: rgba(0,123,255,.12);
    color: #007bff;
}

.cf-icon-green {
    background: rgba(40,167,69,.12);
    color: #28a745;
}

.cf-section-title {
    font-size: .95rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.cf-section-sub {
    font-size: .78rem;
    color: #8a94a6;
    margin-top: .1rem;
}

.cf-section-badge {
    margin-left: auto;
    background: rgba(0,123,255,.1);
    color: #007bff;
    font-size: .7rem;
    font-weight: 700;
    padding: .25rem .65rem;
    border-radius: 20px;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.cf-section-body {
    padding: 1.4rem;
}

/* ── Floating-Label Field ────────────────────────────────────── */
.cf-field {
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.cf-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.cf-input-icon {
    position: absolute;
    left: .95rem;
    color: #adb5bd;
    font-size: .82rem;
    pointer-events: none;
    z-index: 2;
    transition: color .2s;
}

.cf-input {
    width: 100%;
    padding: 1.25rem 1rem .45rem 2.4rem;
    border: 1.5px solid #e0e4ea;
    border-radius: 10px;
    font-size: .9rem;
    color: #1a1a1a;
    background: #f8f9fc;
    outline: none;
    transition: border-color .25s, box-shadow .25s, background .25s;
}

    .cf-input:focus {
        border-color: #007bff;
        background: #fff;
        box-shadow: 0 0 0 3.5px rgba(0,123,255,.13);
    }

/* Floating label */
.cf-label {
    position: absolute;
    left: 2.4rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .88rem;
    color: #8a94a6;
    pointer-events: none;
    transition: all .2s ease;
    background: transparent;
    padding: 0 .2rem;
    white-space: nowrap;
}

/* Floated state — input has value OR is focused */
.cf-input:focus ~ .cf-label,
.cf-input:not(:placeholder-shown) ~ .cf-label {
    top: .55rem;
    transform: translateY(0);
    font-size: .68rem;
    color: #007bff;
    font-weight: 600;
    letter-spacing: .3px;
}

.cf-input:focus ~ .cf-input-icon,
.cf-input:not(:placeholder-shown) ~ .cf-input-icon {
    color: #007bff;
}

/* Re-order so icon is before label in DOM but styled above */
.cf-input-wrap .cf-input-icon {
    order: 0;
}

.cf-input-wrap .cf-input {
    order: 1;
}

.cf-input-wrap .cf-label {
    order: 2;
}

.cf-input-wrap .cf-pwd-toggle {
    order: 3;
}

.cf-required {
    color: #dc3545;
}

.cf-error {
    font-size: .78rem;
    color: #dc3545;
    min-height: 1rem;
    padding-left: .25rem;
}

/* ── Password toggle ─────────────────────────────────────────── */
.cf-pwd-toggle {
    position: absolute;
    right: .75rem;
    background: none;
    border: none;
    color: #adb5bd;
    cursor: pointer;
    padding: .25rem;
    font-size: .85rem;
    transition: color .2s;
    z-index: 2;
}

    .cf-pwd-toggle:hover {
        color: #007bff;
    }

/* ── Password Strength ───────────────────────────────────────── */
.cf-strength {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-top: .35rem;
}

.cf-strength-track {
    flex: 1;
    height: 5px;
    background: #e9ecef;
    border-radius: 99px;
    overflow: hidden;
}

.cf-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 99px;
    transition: width .35s ease, background .35s ease;
}

.cf-strength-label {
    font-size: .74rem;
    font-weight: 600;
    white-space: nowrap;
    min-width: 80px;
}

/* ── Actions ─────────────────────────────────────────────────── */
.cf-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .75rem;
    padding-top: .5rem;
}

.cf-btn-cancel {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .65rem 1.4rem;
    border: 1.5px solid #dee2e6;
    background: #fff;
    color: #6c757d;
    border-radius: 10px;
    font-weight: 600;
    font-size: .88rem;
    text-decoration: none;
    transition: all .25s ease;
}

    .cf-btn-cancel:hover {
        border-color: #adb5bd;
        color: #343a40;
        background: #f8f9fa;
    }

.cf-btn-submit {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.75rem;
    background: linear-gradient(135deg, #007bff 0%, #0056cc 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,123,255,.35);
    transition: all .25s ease;
}

    .cf-btn-submit:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 8px 22px rgba(0,123,255,.4);
    }

    .cf-btn-submit:disabled {
        opacity: .72;
        cursor: not-allowed;
    }

/* ── Info Side Cards ─────────────────────────────────────────── */
.cf-info-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    overflow: hidden;
    border-left: 4px solid #007bff;
    animation: cfSlideIn .4s ease .2s both;
}

.cf-info-card-warn {
    border-left-color: #fd7e14;
}

.cf-info-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .85rem 1.1rem;
    background: #f8f9fc;
    font-size: .82rem;
    font-weight: 700;
    color: #1a1a1a;
    border-bottom: 1px solid #f0f2f5;
}

.cf-info-card .cf-info-header i {
    color: #007bff;
}

.cf-info-card-warn .cf-info-header i {
    color: #fd7e14;
}

.cf-info-list {
    list-style: none;
    margin: 0;
    padding: .85rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

    .cf-info-list li {
        display: flex;
        align-items: center;
        gap: .5rem;
        font-size: .83rem;
        color: #3d4a5c;
    }

        .cf-info-list li i {
            color: #28a745;
            font-size: .8rem;
            flex-shrink: 0;
        }

.cf-info-text {
    padding: .85rem 1.1rem;
    font-size: .83rem;
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
}

/* ── Progress Card ───────────────────────────────────────────── */
.cf-progress-card {
    background: #fff;
    border-radius: 14px;
    padding: 1rem 1.2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    animation: cfSlideIn .4s ease .3s both;
}

.cf-progress-title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #8a94a6;
    margin-bottom: .6rem;
}

.cf-progress-track {
    height: 8px;
    background: #e9ecef;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: .4rem;
}

.cf-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #007bff, #66b2ff);
    border-radius: 99px;
    transition: width .4s ease;
}

.cf-progress-label {
    font-size: .75rem;
    color: #adb5bd;
    text-align: right;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .cf-section-header {
        flex-wrap: wrap;
    }

    .cf-section-badge {
        margin-left: 0;
    }

    .cf-actions {
        flex-direction: column-reverse;
    }

    .cf-btn-cancel,
    .cf-btn-submit {
        width: 100%;
        justify-content: center;
    }
}

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .corp-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .corp-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .corp-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .corp-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .corp-search-input {
        width: 100%;
    }

        .corp-search-input:focus {
            width: 100%;
        }

    .corp-toolbar {
        width: 100%;
        flex-wrap: wrap;
    }

    .corp-search-form {
        width: 100%;
    }

    .corp-search-box {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .corp-stats {
        grid-template-columns: 1fr 1fr;
    }

    .corp-table thead {
        display: none;
    }

    .corp-table .corp-row {
        display: block;
        border-bottom: 2px solid #f0f2f5;
        padding: 0.75rem;
    }

    .corp-table td {
        display: flex;
        justify-content: space-between;
        border: none;
        padding: 0.4rem 0.5rem;
    }
}

/* Remove previous overflow overrides */
.corp-card,
.corp-card-body,
.table-responsive {
    overflow: revert;
}

/* Floating action menu */
.corp-action-menu {
    min-width: 170px;
    border: 1.5px solid #e8ecf2;
    border-radius: 12px;
    padding: 0.4rem;
    background: #fff;
    list-style: none;
}

/* ── COMPANY DETAIL MODAL ─────────────────────────────────────── */
.corp-detail-modal {
    border-radius: 20px;
    overflow: hidden;
}

.corp-detail-header {
    background: linear-gradient(135deg, #007bff 0%, #0052cc 100%);
    padding: 1.5rem 1.5rem 1.25rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.corp-detail-header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.corp-detail-avatar {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: rgba(255,255,255,0.25);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.35);
}

.corp-detail-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

.corp-detail-domain {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.corp-detail-domain:hover { color: #fff; }

.corp-detail-close {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.corp-detail-close:hover { background: rgba(255,255,255,0.3); }

.corp-detail-body {
    background: #f8f9fc;
}

/* Info grid */
.corp-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 576px) {
    .corp-detail-grid { grid-template-columns: 1fr; }
}

.corp-detail-info-card {
    background: #fff;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    border: 1.5px solid #f0f2f5;
}

.corp-detail-info-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8a94a6;
}

.corp-detail-info-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
    word-break: break-all;
}

/* Tabs */
.corp-detail-tabs {
    display: flex;
    gap: 0.4rem;
    border-bottom: 2px solid #e8ecf2;
    padding-bottom: 0;
}

.corp-detail-tab {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #8a94a6;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s, background 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.corp-detail-tab:hover { color: #007bff; background: rgba(0,123,255,0.05); }

.corp-detail-tab.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background: rgba(0,123,255,0.06);
}

.corp-tab-badge {
    background: rgba(0,123,255,0.12);
    color: #007bff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* Tab panel user rows */
.corp-detail-tab-panel {
    background: #fff;
    border-radius: 12px;
    border: 1.5px solid #f0f2f5;
    overflow: hidden;
}

.corp-detail-user-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f2f5;
    transition: background 0.15s;
}

.corp-detail-user-row:last-child { border-bottom: none; }
.corp-detail-user-row:hover { background: #f4f7ff; }

.corp-detail-user-avatar {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #007bff, #0052cc);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.corp-detail-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a1a;
}

.corp-detail-user-email {
    font-size: 0.78rem;
    color: #8a94a6;
}

.corp-detail-empty-tab {
    text-align: center;
    padding: 2rem;
    color: #adb5bd;
    font-size: 0.875rem;
}

/* Loading / error states */
.corp-detail-loading {
    text-align: center;
    padding: 3rem 2rem;
}

.corp-detail-error {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
}

.text-purple { color: #6f42c1; }
.text-monospace { font-family: 'Courier New', monospace; }
