/* =========================================================
   LICENSING
   ========================================================= */

.admin-page {
    padding: 28px;
}


/* Header */

.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
}

.page-header p {
    margin: 6px 0 0;
    color: #6b7280;
    font-size: 14px;
}


/* Main card */

.license-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}


/* Sections */

.license-section {
    padding: 26px 28px;
}

.license-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}


/* Titles */

.license-title {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.license-title > i {
    font-size: 24px;
    margin-top: 2px;
}

.license-title h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.license-title p {
    margin: 5px 0 0;
    color: #6b7280;
    font-size: 13px;
}


/* Status */

.license-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.license-status.active {
    background: #ecfdf3;
    color: #15803d;
}

.license-status.blocked {
    background: #fef2f2;
    color: #dc2626;
}

.license-status i {
    font-size: 13px;
}


/* Platform information */

.license-platform-info {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.license-info-item {
    padding: 15px 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.license-info-item span {
    display: block;
    margin-bottom: 5px;
    color: #6b7280;
    font-size: 12px;
}

.license-info-item strong {
    font-size: 14px;
    font-weight: 600;
}

.license-info-item.is-expired strong,
.license-expired-date,
.license-blocked-expiry strong { color:#b91c1c; font-weight:800; }
.license-expired-date { display:inline-block; padding:3px 8px; border:1px solid #fecaca; border-radius:7px; background:#fef2f2; }
.license-blocked-expiry { display:flex; align-items:center; gap:10px; }
.license-blocked-expiry span { color:#7f1d1d; font-weight:650; }


/* Actions */

.license-actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.license-actions > .button-secondary { display:inline-flex; align-items:center; justify-content:center; gap:8px; white-space:nowrap; }
.license-import-form { display:flex; flex-direction:column; align-items:stretch; gap:7px; margin:0; }
.license-import-form .button-primary { display:inline-flex; align-items:center; justify-content:center; gap:8px; white-space:nowrap; }
.license-import-form small { color:#64748b; font-size:11px; text-align:right; }
.license-file-input[hidden] { display:none; }
.license-notice { margin:-8px 0 18px; padding:11px 14px; border:1px solid #cbdcf4; border-radius:9px; color:#214c82; background:#f1f6ff; font-size:13px; }
.license-notice.error { border-color:#fecaca; color:#991b1b; background:#fef2f2; }
.license-notice.success { border-color:#bbf7d0; color:#166534; background:#f0fdf4; }
.license-import-warning-icon { color:#b45309; background:#fff7ed; }
.license-expiry-icon { color:#b45309; background:#fff7ed; }


/* Divider */

.license-divider {
    height: 1px;
    background: #e5e7eb;
}

/* Blocked platform */

.license-blocked-message {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-top: 24px;
    padding: 28px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
}

.license-blocked-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #dc2626;
    color: #ffffff;
}

.license-blocked-icon i {
    font-size: 32px;
}

.license-blocked-content {
    flex: 1;
}

.license-blocked-content h3 {
    margin: 2px 0 12px;
    color: #b91c1c;
    font-size: 20px;
    font-weight: 700;
}

.license-blocked-content p {
    margin: 0 0 8px;
    color: #172033;
    font-size: 14px;
    line-height: 1.6;
}

.license-blocked-divider {
    height: 1px;
    margin: 20px 0;
    background: #fecaca;
}

.license-blocked-help {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    font-weight: 500;
}

.license-blocked-help i {
    color: #6b7280;
    font-size: 16px;
}

/* Blocked secondary section */

.license-blocked-secondary {
    padding-top: 28px;
    padding-bottom: 28px;
}

.license-blocked-secondary-content {
    text-align: center;
    padding: 20px 12px;
}

.license-blocked-secondary-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #fef2f2;
    color: #dc2626;
}

.license-blocked-secondary-icon i {
    font-size: 30px;
}

.license-blocked-secondary-content h2 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
}

.license-blocked-secondary-content > p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.license-blocked-secondary-content .license-divider {
    margin: 22px 0;
}

.license-blocked-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #4b5563 !important;
    font-size: 14px !important;
    font-weight: 500;
}

.license-blocked-contact i {
    color: #6b7280;
    font-size: 16px;
}

/* Table */

.license-table-wrapper {
    margin-top: 22px;
    overflow-x: auto;
}

.license-table {
    width: 100%;
    border-collapse: collapse;
}

.license-table th {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
}

.license-table td {
    padding: 14px;
    border-bottom: 1px solid #f0f1f3;
    font-size: 13px;
}

.license-table tbody tr:last-child td {
    border-bottom: none;
}

.license-table td:first-child {
    font-weight: 500;
}

.license-table td:first-child i {
    margin-right: 8px;
    font-size: 15px;
}

.license-table th:last-child,
.license-table td:last-child {
    text-align: center;
    font-weight: 600;
}


/* Responsive */

@media (max-width: 768px) {

    .admin-page {
        padding: 18px;
    }

    .license-section-header {
        flex-direction: column;
    }

    .license-platform-info {
        grid-template-columns: 1fr;
    }

    .license-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .license-actions > .button-secondary,
    .license-import-form .button-primary { width:100%; }

    .license-blocked-message {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .license-blocked-help {
        justify-content: center;
    }

    .license-blocked-contact {
        flex-wrap: wrap;
    }
}
