/* =========================================================
   PAGE
   ========================================================= */

.company-edit-page {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 4px 0 50px;
}


/* =========================================================
   BACK LINK
   ========================================================= */

.company-edit-page .back-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin: 0 0 20px 0 !important;
    padding: 8px 18px !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    font-family: "Plus Jakarta Sans", "Inter", sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.06) !important;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.company-edit-page .back-link:hover {
    background: #eff6ff !important;
    color: #2563eb !important;
    border-color: #60a5fa !important;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.18) !important;
    transform: translateX(-4px) !important;
}


/* =========================================================
   HEADER
   ========================================================= */

.edit-page-header {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 125px;

    margin-bottom: 22px;
    padding: 28px 32px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #0f172a 0%,
            #172554 55%,
            #1e40af 100%
        );

    border-radius: 20px;

    box-shadow:
        0 16px 40px rgba(15, 23, 42, .16);
}


/* dekorasi */

.edit-page-header::before {
    content: "";

    position: absolute;

    width: 210px;
    height: 210px;

    right: -70px;
    top: -105px;

    border-radius: 50%;

    background: rgba(59, 130, 246, .18);
}

.edit-page-header::after {
    content: "";

    position: absolute;

    width: 130px;
    height: 130px;

    right: 100px;
    bottom: -90px;

    border-radius: 50%;

    background: rgba(255, 255, 255, .05);
}


/* header content */

.edit-page-header > div {
    position: relative;
    z-index: 2;
}


/* label */

.edit-page-header .detail-label {
    display: block;

    margin-bottom: 7px;

    color: #93c5fd;

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 1.5px;

    text-transform: uppercase;
}


/* title */

.edit-page-header h2 {
    margin: 0;

    color: #ffffff;

    font-size: 26px;
    font-weight: 750;

    line-height: 1.25;

    letter-spacing: -.5px;
}


/* description */

.edit-page-header p {
    margin: 7px 0 0;

    color: #cbd5e1;

    font-size: 12px;

    line-height: 1.6;
}


/* =========================================================
   MAIN EDIT CARD
   ========================================================= */

.edit-company-card {
    width: 100%;

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f8fbff 100%
        );

    border: 1px solid #dbe5f0;

    border-radius: 20px;

    box-shadow:
        0 12px 35px rgba(15, 23, 42, .07);

    overflow: hidden;
}


/* =========================================================
   COMPANY PROFILE
   ========================================================= */

.edit-company-profile {
    display: flex;
    align-items: center;

    gap: 15px;

    padding: 22px 28px;

    background:
        linear-gradient(
            90deg,
            #eff6ff 0%,
            #f8fafc 60%,
            #ffffff 100%
        );

    border-bottom: 1px solid #e5edf6;
}


/* avatar */

.edit-company-avatar {
    width: 54px;
    height: 54px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #1d4ed8
        );

    color: #ffffff;

    font-size: 21px;
    font-weight: 800;

    box-shadow:
        0 8px 20px rgba(37, 99, 235, .25);
}


/* company name */

.edit-company-profile strong {
    display: block;

    margin-bottom: 4px;

    color: #172033;

    font-size: 16px;
    font-weight: 750;
}


/* company ID */

.edit-company-profile span {
    display: block;

    color: #64748b;

    font-size: 11px;
}


/* =========================================================
   FORM
   ========================================================= */

.company-edit-form {
    width: 100%;
}


/* =========================================================
   SECTION
   ========================================================= */

.edit-section {
    position: relative;

    padding: 27px 30px;

    border-bottom: 1px solid #e8eef5;
}

.edit-section:last-of-type {
    border-bottom: none;
}


/* subtle left accent */

.edit-section::before {
    content: "";

    position: absolute;

    left: 0;
    top: 28px;
    bottom: 28px;

    width: 3px;

    border-radius: 0 4px 4px 0;

    background:
        linear-gradient(
            180deg,
            #2563eb,
            #60a5fa
        );
}


/* =========================================================
   SECTION TITLE
   ========================================================= */

.edit-section-title {
    display: flex;
    align-items: center;

    gap: 12px;

    margin-bottom: 22px;
}


/* icon */

.edit-section-icon {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: #eff6ff;

    border: 1px solid #dbeafe;

    color: #2563eb;

    font-size: 16px;

    box-shadow:
        0 4px 12px rgba(37, 99, 235, .08);
}


/* title */

.edit-section-title strong {
    display: block;

    margin-bottom: 3px;

    color: #172033;

    font-size: 14px;
    font-weight: 750;
}


/* subtitle */

.edit-section-title small {
    display: block;

    color: #94a3b8;

    font-size: 10px;

    line-height: 1.5;
}


/* =========================================================
   FORM GRID
   ========================================================= */

.edit-form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 19px 22px;
}


/* full width */

.edit-form-group.full {
    grid-column: 1 / -1;
}


/* =========================================================
   FORM GROUP
   ========================================================= */

.edit-form-group {
    min-width: 0;
}


/* label */

.edit-form-group label {
    display: block;

    margin-bottom: 7px;

    color: #334155;

    font-size: 11px;
    font-weight: 700;
}


/* =========================================================
   INPUT / TEXTAREA / SELECT
   ========================================================= */

.edit-form-group input,
.edit-form-group textarea,
.edit-form-group select {
    width: 100%;

    box-sizing: border-box;

    min-height: 42px;

    padding: 10px 13px;

    background: #ffffff;

    border: 1px solid #d7e0eb;

    border-radius: 10px;

    color: #172033;

    font-family: inherit;

    font-size: 12px;

    outline: none;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease,
        transform .2s ease;
}


/* textarea */

.edit-form-group textarea {
    min-height: 105px;

    resize: vertical;

    line-height: 1.6;
}


/* hover */

.edit-form-group input:hover,
.edit-form-group textarea:hover,
.edit-form-group select:hover {
    border-color: #b8c7d9;
}


/* focus */

.edit-form-group input:focus,
.edit-form-group textarea:focus,
.edit-form-group select:focus {
    background: #ffffff;

    border-color: #3b82f6;

    box-shadow:
        0 0 0 3px rgba(59, 130, 246, .11);
}


/* =========================================================
   STATUS
   ========================================================= */

.status-field {
    max-width: 430px;
}


/* select khusus status */

.status-field select {
    appearance: auto;

    background-color: #ffffff;

    font-weight: 650;
}


/* help */

.field-help {
    display: block;

    margin-top: 8px;

    color: #94a3b8;

    font-size: 10px;

    line-height: 1.55;
}


/* =========================================================
   FORM ACTIONS
   ========================================================= */

.edit-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 10px;

    padding: 22px 30px;

    background:
        linear-gradient(
            90deg,
            #f8fafc,
            #f1f5f9
        );

    border-top: 1px solid #e5edf5;
}


/* =========================================================
   CANCEL
   ========================================================= */

.edit-cancel-button {
    min-height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 17px;

    border: 1px solid #d5dee9;

    border-radius: 9px;

    background: #ffffff;

    color: #475569;

    font-size: 11px;
    font-weight: 700;

    text-decoration: none;

    transition: all .2s ease;
}

.edit-cancel-button:hover {
    background: #f8fafc;

    border-color: #c4d0de;

    color: #172033;

    transform: translateY(-1px);
}


/* =========================================================
   SAVE
   ========================================================= */

.edit-save-button {
    min-height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 0 19px;

    border: 1px solid #2563eb;

    border-radius: 9px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #1d4ed8
        );

    color: #ffffff;

    font-family: inherit;

    font-size: 11px;
    font-weight: 750;

    cursor: pointer;

    box-shadow:
        0 7px 16px rgba(37, 99, 235, .20);

    transition: all .2s ease;
}

.edit-save-button:hover {
    background:
        linear-gradient(
            135deg,
            #1d4ed8,
            #1e40af
        );

    box-shadow:
        0 10px 22px rgba(37, 99, 235, .27);

    transform: translateY(-1px);
}

.edit-save-button:active {
    transform: translateY(0);
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.company-edit-page .empty-state {
    padding: 60px 25px;

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 18px;

    text-align: center;

    box-shadow:
        0 10px 30px rgba(15, 23, 42, .06);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 850px) {

    .company-edit-page {
        max-width: none;
    }

    .edit-page-header {
        padding: 25px;
    }

    .edit-form-grid {
        grid-template-columns: 1fr;
    }

    .edit-form-group.full {
        grid-column: auto;
    }

}


@media (max-width: 650px) {

    .company-edit-page {
        padding-bottom: 30px;
    }

    .edit-page-header {
        min-height: auto;

        padding: 23px;

        border-radius: 16px;
    }

    .edit-page-header h2 {
        font-size: 22px;
    }

    .edit-page-header p {
        font-size: 11px;
    }

    .edit-company-profile {
        padding: 18px 20px;
    }

    .edit-company-avatar {
        width: 48px;
        height: 48px;
    }

    .edit-section {
        padding: 23px 20px;
    }

    .edit-section::before {
        top: 23px;
        bottom: 23px;
    }

    .edit-form-actions {
        padding: 18px 20px;

        flex-direction: column-reverse;

        align-items: stretch;
    }

    .edit-cancel-button,
    .edit-save-button {
        width: 100%;
    }

}


/* =========================================================
   DARK MODE OVERRIDES FOR COMPANY EDIT PAGE
   ========================================================= */

html.theme-dark .company-edit-page .back-link {
    background: #182854 !important;
    border: 1px solid rgba(99, 102, 241, 0.35) !important;
    color: #a5b4fc !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}

html.theme-dark .company-edit-page .back-link:hover {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #60a5fa !important;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45) !important;
    transform: translateX(-4px) !important;
}

html.theme-dark .edit-page-header {
    background: linear-gradient(135deg, #0b1329 0%, #151d38 50%, #1c284e 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4) !important;
}

html.theme-dark .edit-page-header .detail-label {
    color: #38bdf8 !important;
}

html.theme-dark .edit-page-header h2 {
    color: #ffffff !important;
}

html.theme-dark .edit-page-header p {
    color: #94a3b8 !important;
}

html.theme-dark .edit-company-card {
    background: #0d1527 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5) !important;
}

html.theme-dark .edit-company-profile {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18) 0%, rgba(15, 23, 42, 0.7) 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 24px 30px !important;
}

html.theme-dark .edit-company-avatar {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35) !important;
}

html.theme-dark .edit-company-profile strong {
    color: #ffffff !important;
    font-size: 17px !important;
}

html.theme-dark .edit-company-profile span {
    color: #a5b4fc !important;
    font-weight: 600 !important;
}

html.theme-dark .edit-section {
    background: rgba(20, 32, 60, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-left: 3px solid #3b82f6 !important;
    border-radius: 14px !important;
    margin: 22px 28px !important;
    padding: 24px 26px !important;
}

html.theme-dark .edit-section-icon {
    background: rgba(59, 130, 246, 0.2) !important;
    border: 1px solid rgba(96, 165, 250, 0.4) !important;
    color: #60a5fa !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

html.theme-dark .edit-section-title strong {
    color: #ffffff !important;
    font-size: 15px !important;
}

html.theme-dark .edit-section-title small {
    color: #a5b4fc !important;
}

html.theme-dark .edit-form-group label {
    color: #e2e8f0 !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
}

html.theme-dark .edit-form-group input,
html.theme-dark .edit-form-group textarea,
html.theme-dark .edit-form-group select {
    background: #18264a !important;
    border: 1px solid rgba(147, 197, 253, 0.25) !important;
    color: #ffffff !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    font-weight: 600 !important;
}

html.theme-dark .edit-form-group input:hover,
html.theme-dark .edit-form-group textarea:hover,
html.theme-dark .edit-form-group select:hover {
    border-color: rgba(147, 197, 253, 0.5) !important;
    background: #1e305e !important;
}

html.theme-dark .edit-form-group input:focus,
html.theme-dark .edit-form-group textarea:focus,
html.theme-dark .edit-form-group select:focus {
    background: #1f3261 !important;
    border-color: #60a5fa !important;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

html.theme-dark .status-field select {
    background-color: #18264a !important;
    color: #ffffff !important;
    border: 1px solid rgba(147, 197, 253, 0.3) !important;
}

html.theme-dark .status-field select option {
    background-color: #0d1527 !important;
    color: #ffffff !important;
}

html.theme-dark .field-help {
    color: #94a3b8 !important;
}

html.theme-dark .edit-form-actions {
    background: #080e1c !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 22px 30px !important;
}

html.theme-dark .edit-cancel-button {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #f1f5f9 !important;
    font-weight: 700 !important;
}

html.theme-dark .edit-cancel-button:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
}

html.theme-dark .edit-save-button {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border: 1px solid #60a5fa !important;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4) !important;
    font-weight: 800 !important;
}

html.theme-dark .edit-save-button:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.55) !important;
}

html.theme-dark .company-edit-page .empty-state {
    background: #0d1527 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}