/* ── XLic Portal — Elegant Beige & Grey ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.xlic-portal {
    font-family: 'Segoe UI', -apple-system, sans-serif;
    direction: rtl;
    max-width: 820px;
    margin: 48px auto;
    color: #2c2c2c;
    min-height: 400px;
}

/* ── Loading ── */
.xlic-loader {
    display: flex; align-items: center; justify-content: center;
    height: 200px;
}
.xlic-spinner {
    width: 32px; height: 32px;
    border: 2px solid #d9d3c8;
    border-top-color: #8c7f6e;
    border-radius: 50%;
    animation: xlic-spin .7s linear infinite;
}
@keyframes xlic-spin { to { transform: rotate(360deg); } }

/* ── Login Card ── */
.xlic-login-wrap {
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.xlic-login-card {
    background: #faf8f5;
    border: 1px solid #e2ddd6;
    border-radius: 16px;
    padding: 48px 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.xlic-login-logo {
    text-align: center;
    margin-bottom: 28px;
}
.xlic-login-logo svg { width: 48px; height: 48px; }
.xlic-login-card h2 {
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    color: #1e1e1e;
    margin-bottom: 6px;
}
.xlic-login-sub {
    text-align: center;
    font-size: 13px;
    color: #9e9488;
    margin-bottom: 32px;
}

/* ── Form fields ── */
.xlic-field { margin-bottom: 18px; }
.xlic-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #7a7060;
    margin-bottom: 7px;
}
.xlic-field input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #d9d3c8;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: #2c2c2c;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}
.xlic-field input:focus {
    border-color: #8c7f6e;
    box-shadow: 0 0 0 3px rgba(140,127,110,.12);
}
.xlic-field small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #b0a898;
}

/* ── Buttons ── */
.xlic-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background .15s, transform .1s, box-shadow .15s;
    text-decoration: none;
}
.xlic-btn:active { transform: translateY(1px); }
.xlic-btn-primary {
    background: #5c5042;
    color: #fff;
}
.xlic-btn-primary:hover { background: #4a3f35; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.xlic-btn-outline {
    background: transparent;
    border: 1px solid #d9d3c8;
    color: #5c5042;
}
.xlic-btn-outline:hover { background: #f0ece6; }
.xlic-btn-danger {
    background: #f5eeee;
    color: #8b3a3a;
    border: 1px solid #e8d5d5;
}
.xlic-btn-danger:hover { background: #eedada; }
.xlic-btn-sm { padding: 6px 14px; font-size: 12px; }
.xlic-btn-full { width: 100%; justify-content: center; padding: 13px; font-size: 15px; }
.xlic-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Alert ── */
.xlic-alert {
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}
.xlic-alert-error   { background: #fdf0f0; color: #8b3a3a; border-color: #e8d5d5; }
.xlic-alert-success { background: #f0f7f2; color: #2e6646; border-color: #c5dece; }

/* ── Dashboard Header ── */
.xlic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2ddd6;
    margin-bottom: 28px;
}
.xlic-header-left h1 {
    font-size: 20px;
    font-weight: 600;
    color: #1e1e1e;
}
.xlic-header-left p {
    font-size: 13px;
    color: #9e9488;
    margin-top: 2px;
}
.xlic-header-right { display: flex; gap: 10px; align-items: center; }

/* ── License Card ── */
.xlic-license-card {
    background: #faf8f5;
    border: 1px solid #e2ddd6;
    border-radius: 14px;
    margin-bottom: 20px;
    overflow: hidden;
}
.xlic-license-head {
    padding: 18px 24px;
    background: #f2ede7;
    border-bottom: 1px solid #e2ddd6;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
}
.xlic-license-title { font-size: 16px; font-weight: 700; color: #1e1e1e; }
.xlic-license-meta  { font-size: 12px; color: #9e9488; margin-top: 4px; }
.xlic-license-body  { padding: 20px 24px; }

/* ── Quota bar ── */
.xlic-quota { margin-bottom: 20px; }
.xlic-quota-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #7a7060;
    margin-bottom: 7px;
    font-weight: 600;
}
.xlic-quota-bar {
    background: #e2ddd6;
    border-radius: 99px;
    height: 6px;
}
.xlic-quota-fill {
    height: 6px;
    border-radius: 99px;
    background: #8c7f6e;
    transition: width .4s;
}
.xlic-quota-fill.full { background: #8b3a3a; }

/* ── Keys table ── */
.xlic-keys-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.xlic-keys-table th {
    text-align: right;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: #9e9488;
    border-bottom: 1px solid #e2ddd6;
}
.xlic-keys-table td {
    padding: 10px 10px;
    border-bottom: 1px solid #f0ece6;
    color: #2c2c2c;
    vertical-align: middle;
}
.xlic-keys-table tr:last-child td { border-bottom: none; }
.xlic-domain { font-family: 'Courier New', monospace; font-size: 13px; color: #3d3530; }
.xlic-key-code {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #7a7060;
    background: #ede9e3;
    padding: 3px 7px;
    border-radius: 4px;
}

/* ── Badge ── */
.xlic-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
}
.xlic-badge-active   { background: #e8f2ec; color: #2e6646; }
.xlic-badge-revoked  { background: #f5eeee; color: #8b3a3a; }
.xlic-badge-lifetime { background: #edeae5; color: #5c5042; }
.xlic-badge-1year    { background: #f0ece6; color: #7a6050; }
.xlic-badge-expired  { background: #f5eeee; color: #8b3a3a; }

/* ── Add domain row ── */
.xlic-add-row {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 14px 0 0;
    flex-wrap: wrap;
}
.xlic-add-row input {
    flex: 1;
    min-width: 200px;
    padding: 9px 13px;
    border: 1px solid #d9d3c8;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    outline: none;
    background: #fff;
}
.xlic-add-row input:focus { border-color: #8c7f6e; box-shadow: 0 0 0 3px rgba(140,127,110,.12); }

/* ── Empty state ── */
.xlic-empty {
    text-align: center;
    padding: 60px 24px;
    color: #9e9488;
}
.xlic-empty-icon { font-size: 40px; margin-bottom: 12px; }
.xlic-empty p { font-size: 14px; }

/* ── Divider ── */
.xlic-divider { border: none; border-top: 1px solid #e2ddd6; margin: 16px 0; }

/* ── Check time ── */
.xlic-check-time { font-size: 11px; color: #b0a898; }

/* ── Responsive ── */
@media(max-width:600px) {
    .xlic-portal { margin: 16px; }
    .xlic-login-card { padding: 32px 24px; }
    .xlic-license-head { flex-direction: column; }
    .xlic-keys-table th:nth-child(3), .xlic-keys-table td:nth-child(3) { display: none; }
}
