/**
 * ABSENSIKU v1.0
 * Master Company Modern
 */

.master-company-page,
.master-company-detail {
    display: grid;
    gap: 22px;
    width: 100%;
    max-width: 1420px;
    margin: 0 auto;
    padding-bottom: 36px;
}

.master-company-hero,
.master-company-detail__hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    border: 1px solid #dfe5ee;
    border-radius: 20px;
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f8fafc 100%
        );
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
}

.master-company-eyebrow,
.master-company-detail__hero small {
    display: block;
    margin-bottom: 7px;
    color: #2563eb;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.master-company-hero h1,
.master-company-detail__hero h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 820;
    letter-spacing: -0.05em;
}

.master-company-hero p,
.master-company-detail__hero p {
    max-width: 700px;
    margin: 10px 0 0;
    color: #64748b;
    line-height: 1.65;
}

.master-company-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 11px;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 780;
    text-decoration: none;
    cursor: pointer;
}

.master-company-button--primary {
    background: #2563eb;
    color: #fff;
}

.master-company-button--secondary {
    border-color: #cbd5e1;
    background: #fff;
    color: #334155;
}

.master-company-button--location {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.master-company-summary,
.master-company-detail__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.master-company-summary article,
.master-company-detail__stats article {
    padding: 18px;
    border: 1px solid #dfe5ee;
    border-radius: 16px;
    background: #fff;
}

.master-company-summary span,
.master-company-detail__stats span {
    color: #64748b;
    font-size: 0.76rem;
}

.master-company-summary strong,
.master-company-detail__stats strong {
    display: block;
    margin-top: 8px;
    color: #0f172a;
    font-size: 1.7rem;
    line-height: 1;
}

.master-company-summary small,
.master-company-detail__stats small {
    display: block;
    margin-top: 7px;
    color: #94a3b8;
    font-size: 0.72rem;
}

.master-company-panel,
.master-company-detail__card {
    overflow: hidden;
    border: 1px solid #dfe5ee;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.035);
}

.master-company-filter {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 190px auto;
    gap: 14px;
    align-items: end;
    padding: 20px;
}

.master-company-filter > div {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.master-company-filter label,
.master-company-list-header label {
    color: #334155;
    font-size: 0.76rem;
    font-weight: 750;
}

.master-company-filter input,
.master-company-filter select,
.master-company-list-header select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    padding: 0 12px;
    font: inherit;
}

.master-company-filter__actions {
    display: flex !important;
    flex-direction: row;
    gap: 8px !important;
}

.master-company-list-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border-bottom: 1px solid #e7ebf1;
    background: #fbfcfe;
}

.master-company-list-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.15rem;
}

.master-company-list-header p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 0.8rem;
}

.master-company-list-header form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.master-company-table-wrap {
    overflow-x: auto;
}

.master-company-table {
    width: 100%;
    min-width: 1040px;
    border-collapse: collapse;
}

.master-company-table th,
.master-company-table td {
    padding: 15px 18px;
    border-bottom: 1px solid #edf0f4;
    text-align: left;
    vertical-align: middle;
}

.master-company-table th {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.master-company-table td {
    color: #334155;
    font-size: 0.8rem;
}

.master-company-table small {
    display: block;
    margin-top: 4px;
    color: #64748b;
}

.master-company-identity {
    display: flex;
    align-items: center;
    gap: 11px;
}

.master-company-identity > span,
.master-company-detail__heading > span {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border-radius: 13px;
    background: #e8efff;
    color: #1d4ed8;
    font-weight: 850;
}

.master-company-identity strong,
.master-company-cell-main {
    color: #0f172a;
}

.master-company-badge {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
}

.master-company-badge--success {
    background: #dcfce7;
    color: #166534;
}

.master-company-badge--warning {
    background: #fef3c7;
    color: #92400e;
}

.master-company-badge--secondary {
    background: #e2e8f0;
    color: #475569;
}

.master-company-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.master-company-actions a,
.master-company-actions button {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 0 9px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}

.master-company-actions form {
    margin: 0;
}

.master-company-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 22px;
}

.master-company-pagination a {
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 750;
    text-decoration: none;
}

.master-company-pagination .is-disabled {
    pointer-events: none;
    opacity: 0.45;
}

.master-company-empty {
    display: grid;
    place-items: center;
    padding: 52px 24px;
    text-align: center;
}

.master-company-empty > span {
    font-size: 2rem;
}

.master-company-empty h3 {
    margin: 12px 0 0;
    color: #0f172a;
}

.master-company-empty p {
    margin: 7px 0 18px;
    color: #64748b;
}

.master-company-location-tools {
    align-content: start;
}

.master-company-location-tools small[data-state="success"] {
    color: #15803d;
}

.master-company-location-tools small[data-state="danger"] {
    color: #b91c1c;
}

.master-company-map {
    min-height: 280px;
    overflow: hidden;
    border: 1px solid #dfe5ee;
    border-radius: 14px;
    background: #f8fafc;
}

.master-company-map > div {
    display: grid;
    min-height: 280px;
    place-items: center;
    padding: 24px;
    color: #64748b;
    text-align: center;
}

.master-company-map iframe {
    display: block;
    width: 100%;
    height: 320px;
    border: 0;
}

.master-company-detail__hero {
    align-items: center;
}

.master-company-detail__hero > a {
    color: #475569;
    font-size: 0.8rem;
    font-weight: 750;
    text-decoration: none;
}

.master-company-detail__heading {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.master-company-detail__heading > span {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
    border-radius: 18px;
    font-size: 1.15rem;
}

.master-company-detail__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
    gap: 18px;
}

.master-company-detail__card header {
    padding: 20px 22px;
    border-bottom: 1px solid #e7ebf1;
    background: #fbfcfe;
}

.master-company-detail__card header small {
    color: #2563eb;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.master-company-detail__card header h2 {
    margin: 5px 0 0;
    color: #0f172a;
    font-size: 1.05rem;
}

.master-company-detail__card dl {
    display: grid;
    margin: 0;
}

.master-company-detail__card dl > div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    padding: 15px 22px;
    border-bottom: 1px solid #edf0f4;
}

.master-company-detail__card dt {
    color: #64748b;
    font-size: 0.75rem;
}

.master-company-detail__card dd {
    margin: 0;
    color: #0f172a;
    overflow-wrap: anywhere;
}

.master-company-detail__map {
    display: block;
    width: calc(100% - 44px);
    height: 300px;
    margin: 20px 22px 22px;
    border: 0;
    border-radius: 14px;
}

.master-company-detail__empty {
    display: grid;
    place-items: center;
    min-height: 360px;
    padding: 30px;
    text-align: center;
}

.master-company-detail__empty > span {
    font-size: 2.2rem;
}

.master-company-detail__empty h3 {
    margin: 12px 0 0;
}

.master-company-detail__empty p {
    max-width: 390px;
    color: #64748b;
}

@media (max-width: 1100px) {
    .master-company-filter {
        grid-template-columns: 1fr 1fr;
    }

    .master-company-filter__search {
        grid-column: 1 / -1;
    }

    .master-company-detail__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .master-company-hero,
    .master-company-detail__hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .master-company-summary,
    .master-company-detail__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .master-company-filter {
        grid-template-columns: 1fr;
    }

    .master-company-filter__search {
        grid-column: auto;
    }
}

@media (max-width: 520px) {
    .master-company-summary,
    .master-company-detail__stats {
        grid-template-columns: 1fr;
    }

    .master-company-filter__actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
    }

    .master-company-button {
        width: 100%;
    }

    .master-company-detail__card dl > div {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}
