﻿/* =========================
   LICENSES PAGE
   ========================= */

.licenses-page {
    width: 100%;
    max-width: 1700px;
    margin: 0 auto;
    padding-bottom: 40px;
}

    /* HEADER */

    .licenses-page .page-head {
        align-items: center;
        margin-bottom: 22px;
    }

        .licenses-page .page-head h1 {
            margin-top: 7px;
            font-size: clamp(30px, 3vw, 42px);
            font-weight: 950;
            letter-spacing: -.045em;
        }

        .licenses-page .page-head p {
            margin-top: 9px;
            font-size: 14px;
            line-height: 1.6;
        }

/* SUMMARY PANEL */

.licenses-summary-panel {
    padding: 22px;
}

.licenses-summary-head {
    margin-bottom: 18px;
}

    .licenses-summary-head h2 {
        margin: 0;
        color: #0f172a;
        font-size: 19px;
        font-weight: 900;
    }

    .licenses-summary-head p {
        margin: 7px 0 0;
        color: #64748b;
        font-size: 12px;
    }

.license-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.license-stat-card {
    position: relative;
    min-height: 132px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .055);
}

    .license-stat-card::after {
        content: "";
        position: absolute;
        top: -35px;
        right: -35px;
        width: 100px;
        height: 100px;
        border-radius: 50%;
        opacity: .10;
    }

    .license-stat-card.total::after {
        background: #2563eb;
    }

    .license-stat-card.active::after {
        background: #16a34a;
    }

    .license-stat-card.warning::after {
        background: #d97706;
    }

    .license-stat-card.critical::after {
        background: #dc2626;
    }

.license-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.license-stat-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 18px;
}

.license-stat-value {
    margin-top: 18px;
    color: #0f172a;
    font-size: 32px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -.045em;
}

.license-stat-label {
    margin-top: 7px;
    color: #64748b;
    font-size: 12px;
    font-weight: 750;
}

/* LIST PANEL */

.licenses-list-panel {
    padding: 0;
    overflow: hidden;
}

.licenses-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border-bottom: 1px solid #edf2f7;
}

    .licenses-list-header h2 {
        margin: 0;
        color: #0f172a;
        font-size: 19px;
        font-weight: 900;
    }

    .licenses-list-header small {
        display: block;
        margin-top: 6px;
        color: #64748b;
        font-size: 11px;
    }

.licenses-search {
    display: flex;
    width: min(380px, 100%);
    min-height: 42px;
    align-items: center;
    gap: 9px;
    padding: 0 13px;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #f8fafc;
}

    .licenses-search span {
        color: #64748b;
        font-size: 18px;
    }

    .licenses-search input {
        width: 100%;
        border: 0;
        outline: none;
        color: #0f172a;
        background: transparent;
        font-family: inherit;
        font-size: 12px;
    }

/* TABLE */

.licenses-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.licenses-table {
    width: 100%;
    border-collapse: collapse;
}

    .licenses-table th {
        padding: 13px 16px;
        color: #64748b;
        background: #f8fafc;
        text-align: left;
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .licenses-table td {
        padding: 15px 16px;
        border-top: 1px solid #f1f5f9;
        color: #334155;
        font-size: 12px;
        vertical-align: middle;
    }

    .licenses-table tbody tr:hover {
        background: #fafcff;
    }

.license-company-link {
    color: #0f172a;
    font-weight: 850;
    text-decoration: none;
}

    .license-company-link:hover {
        color: #2563eb;
    }

.license-plan {
    color: #0f172a;
    font-weight: 850;
}

.license-limit {
    display: inline-flex;
    min-width: 32px;
    justify-content: center;
    padding: 5px 8px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
}

.license-date strong {
    display: block;
    color: #0f172a;
    font-size: 12px;
}

.license-date small {
    display: block;
    margin-top: 4px;
    color: #94a3b8;
    font-size: 9px;
}

/* MODULES */

.module-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 220px;
}

.module-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
}

    .module-pill.ok {
        color: #166534;
        background: #dcfce7;
    }

    .module-pill.off {
        color: #94a3b8;
        background: #f1f5f9;
    }

/* STATUS */

.license-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

    .license-status::before {
        content: "";
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: currentColor;
    }

    .license-status.ok {
        color: #047857;
        background: #d1fae5;
    }

    .license-status.warn {
        color: #92400e;
        background: #fef3c7;
    }

    .license-status.bad {
        color: #b91c1c;
        background: #fee2e2;
    }

.license-open-button {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid #dbe4ef;
    border-radius: 10px;
    color: #334155;
    background: #fff;
    text-decoration: none;
    font-size: 10px;
    font-weight: 850;
}

    .license-open-button:hover {
        color: #1d4ed8;
        border-color: #bfdbfe;
        background: #eff6ff;
    }

/* RESPONSIVE */

@media (max-width: 1200px) {
    .license-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .licenses-page .page-head,
    .licenses-list-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .licenses-search {
        width: 100%;
    }

    .license-stats-grid {
        grid-template-columns: 1fr;
    }
}
