:root {
    --pl-bg: #0f172a;
    --pl-bg-deep: #0b1220;
    --pl-panel: #172238;
    --pl-panel-soft: #1d2a42;
    --pl-border: rgba(255, 255, 255, 0.08);
    --pl-border-strong: rgba(56, 189, 248, 0.28);
    --pl-text: #e5e7eb;
    --pl-muted: #94a3b8;
    --pl-accent: #38bdf8;
    --pl-accent-soft: rgba(56, 189, 248, 0.12);
    --pl-success: #22c55e;
    --pl-danger: #ef4444;
    --pl-radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 30%),
        linear-gradient(135deg, var(--pl-bg), #111827);
    color: var(--pl-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.pl-app {
    display: flex;
    min-height: 100vh;
}

.pl-sidebar {
    width: 240px;
    position: fixed;
    inset: 0 auto 0 0;
    padding: 24px 20px;
    background: #10192d;
    border-right: 1px solid var(--pl-border);
}

.pl-main {
    margin-left: 240px;
    width: calc(100% - 240px);
    padding: 16px 20px 24px;
}

.pl-sidebar-brand {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 34px;
}

.pl-sidebar-brand .mark,
.pl-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, var(--pl-accent), #2563eb);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.25);
}

.pl-sidebar-brand strong {
    display: block;
    font-size: 17px;
}

.pl-sidebar-brand span {
    display: block;
    font-size: 12px;
    color: var(--pl-muted);
}

.pl-nav-title {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--pl-muted);
    margin: 0 0 14px;
}

.pl-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    border-radius: 14px;
    font-weight: 700;
    color: var(--pl-muted);
    margin-bottom: 8px;
    border: 1px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.pl-nav-link:hover {
    background: var(--pl-accent-soft);
    color: var(--pl-text);
    transform: translateX(2px);
}

.pl-nav-link.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(37, 99, 235, 0.18));
    border-color: rgba(56, 189, 248, 0.2);
    color: #ffffff;
}

.pl-topbar,
.pl-card {
    background: linear-gradient(180deg, rgba(23, 34, 56, 0.96), rgba(23, 34, 56, 0.86));
    border: 1px solid var(--pl-border);
    border-radius: 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.16);
}

.pl-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    margin-bottom: 18px;
}

.pl-page-title h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.1;
}

.pl-page-title p {
    margin: 8px 0 0;
    color: var(--pl-muted);
    font-size: 16px;
}

.pl-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    padding: 10px 14px;
    border: 1px solid var(--pl-border);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.4);
    color: var(--pl-text);
    font-weight: 600;
}

.pl-grid {
    display: grid;
    gap: 18px;
}

.pl-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pl-grid-2 {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
}

.pl-card {
    padding: 20px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.pl-card:hover {
    border-color: rgba(56, 189, 248, 0.25);
    transform: translateY(-2px);
}

.pl-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.pl-card-label {
    font-size: 13px;
    color: var(--pl-muted);
    margin-bottom: 12px;
    font-weight: 600;
}

.pl-card-value {
    font-size: 38px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 10px;
}

.pl-card-note,
.pl-muted-text {
    color: var(--pl-muted);
    line-height: 1.5;
}

.pl-section-title {
    margin: 0 0 20px;
    font-size: 18px;
}

.pl-card-header .pl-section-title {
    margin: 0;
}

.pl-activity-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--pl-border);
}

.pl-activity-item:last-child {
    border-bottom: 0;
}

.pl-activity-item strong {
    display: block;
    font-size: 16px;
}

.pl-activity-item span {
    display: block;
    color: var(--pl-muted);
    margin-top: 4px;
}

.pl-status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    min-width: 10px;
    border-radius: 50%;
    background: var(--pl-success);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.pl-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.pl-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--pl-text);
    table-layout: fixed;
}

.pl-table th {
    padding: 0 10px 14px;
    text-align: left;
    color: var(--pl-muted);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.pl-table td {
    padding: 16px 10px;
    border-top: 1px solid var(--pl-border);
    vertical-align: middle;
    color: var(--pl-muted);
}

.pl-table th:first-child,
.pl-table td:first-child {
    padding-left: 0;
}

.pl-table td:first-child {
    color: var(--pl-text);
}

.pl-websites-table th:nth-child(1),
.pl-websites-table td:nth-child(1) {
    width: 22%;
}

.pl-websites-table th:nth-child(2),
.pl-websites-table td:nth-child(2) {
    width: 31%;
}

.pl-websites-table th:nth-child(3),
.pl-websites-table td:nth-child(3) {
    width: 8%;
}

.pl-websites-table th:nth-child(4),
.pl-websites-table td:nth-child(4) {
    width: 13%;
}

.pl-websites-table th:nth-child(5),
.pl-websites-table td:nth-child(5) {
    width: 12%;
}

.pl-websites-table th:nth-child(6),
.pl-websites-table td:nth-child(6) {
    width: 14%;
}

.pl-table-actions {
    text-align: right !important;
    white-space: nowrap;
}

.pl-code-text {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
}

.pl-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--pl-border);
    color: var(--pl-muted);
    background: rgba(15, 23, 42, 0.5);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.pl-badge-good {
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.32);
    background: rgba(34, 197, 94, 0.1);
}

.pl-action-link {
    display: inline-flex;
    margin-left: 10px;
    color: var(--pl-accent);
    font-size: 13px;
    font-weight: 800;
}

.pl-action-link.danger {
    color: #fca5a5;
}

.pl-form-group {
    margin-bottom: 20px;
}

.pl-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--pl-text);
}

input.pl-form-control,
select.pl-form-control,
textarea.pl-form-control {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 13px 14px;
    border: 1px solid var(--pl-border);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.78) !important;
    color: var(--pl-text) !important;
    font-size: 15px;
    line-height: 1.4;
    outline: none;
    box-shadow: none;
}

select.pl-form-control {
    cursor: pointer;
}

input.pl-form-control::placeholder,
textarea.pl-form-control::placeholder {
    color: #64748b;
}

input.pl-form-control:focus,
select.pl-form-control:focus,
textarea.pl-form-control:focus {
    border-color: var(--pl-accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.pl-form-actions {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
    margin-top: 10px;
}

.pl-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 0;
    border-radius: 12px;
    padding: 13px 18px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.pl-btn:hover {
    transform: translateY(-1px);
}

.pl-btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--pl-accent), #2563eb);
}

.pl-btn-secondary {
    color: var(--pl-muted);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--pl-border);
}

.pl-btn-secondary:hover {
    color: var(--pl-text);
    border-color: var(--pl-border-strong);
}

.pl-btn-small {
    padding: 10px 14px;
    font-size: 13px;
}

.pl-toggle {
    display: flex !important;
    align-items: center;
    gap: 12px;
    margin-bottom: 0 !important;
    cursor: pointer;
}

.pl-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pl-toggle-track {
    position: relative;
    width: 48px;
    height: 26px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--pl-border);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.pl-toggle-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--pl-muted);
    transition: transform 0.2s ease, background 0.2s ease;
}

.pl-toggle input:checked + .pl-toggle-track {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.45);
}

.pl-toggle input:checked + .pl-toggle-track::after {
    transform: translateX(22px);
    background: var(--pl-success);
}

.pl-toggle-label {
    color: var(--pl-text);
    font-weight: 700;
}

.pl-alert {
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 14px;
}

.pl-alert-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

.pl-card p .pl-nav-link,
.pl-card .pl-nav-link {
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--pl-border);
    border-radius: 12px;
    padding: 12px 14px;
    margin: 0 0 10px;
}

.pl-card .pl-nav-link:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(37, 99, 235, 0.12));
    border-color: rgba(56, 189, 248, 0.28);
    transform: none;
}

.pl-auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.pl-auth-card {
    width: 100%;
    max-width: 430px;
    background: rgba(23, 34, 56, 0.92);
    border: 1px solid var(--pl-border);
    border-radius: 24px;
    padding: 34px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.pl-auth-card h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.pl-auth-card p {
    margin: 0 0 24px;
    color: var(--pl-muted);
}

@media (max-width: 1180px) {
    .pl-grid-4,
    .pl-grid-2 {
        grid-template-columns: 1fr;
    }

    .pl-user-pill {
        white-space: normal;
    }
}

@media (max-width: 960px) {
    .pl-app {
        display: block;
    }

    .pl-sidebar {
        position: static;
        width: 100%;
    }

    .pl-main {
        margin-left: 0;
        width: 100%;
    }

    .pl-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .pl-form-actions {
        grid-template-columns: 1fr;
    }

    .pl-table {
        min-width: 760px;
    }
}
.pl-btn-danger {
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}
/* Website table and navigation polish */
.pl-table-wrap {
    width: 100%;
    overflow-x: hidden;
}

.pl-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.pl-table th {
    padding: 0 8px 14px;
    text-align: left;
    color: var(--pl-muted);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.pl-table td {
    padding: 16px 8px;
    border-top: 1px solid var(--pl-border);
    vertical-align: middle;
}

.pl-websites-table th:nth-child(1),
.pl-websites-table td:nth-child(1) { width: 22%; }

.pl-websites-table th:nth-child(2),
.pl-websites-table td:nth-child(2) { width: 27%; }

.pl-websites-table th:nth-child(3),
.pl-websites-table td:nth-child(3) { width: 7%; }

.pl-websites-table th:nth-child(4),
.pl-websites-table td:nth-child(4) { width: 12%; }

.pl-websites-table th:nth-child(5),
.pl-websites-table td:nth-child(5) { width: 12%; }

.pl-websites-table th:nth-child(6),
.pl-websites-table td:nth-child(6) { width: 20%; }

.pl-table-actions {
    text-align: right !important;
    white-space: nowrap;
}

.pl-code-text {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pl-action-link {
    display: inline-flex;
    margin-left: 8px;
    color: var(--pl-accent);
    font-size: 13px;
    font-weight: 800;
}

.pl-action-link.danger {
    color: #fca5a5;
}

.pl-btn-danger {
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

@media (max-width: 960px) {
    .pl-table-wrap {
        overflow-x: auto;
    }

    .pl-table {
        min-width: 760px;
    }
}
/* Users table polish */
.pl-users-table th:nth-child(1),
.pl-users-table td:nth-child(1) { width: 18%; }

.pl-users-table th:nth-child(2),
.pl-users-table td:nth-child(2) { width: 30%; }

.pl-users-table th:nth-child(3),
.pl-users-table td:nth-child(3) { width: 12%; }

.pl-users-table th:nth-child(4),
.pl-users-table td:nth-child(4) { width: 13%; }

.pl-users-table th:nth-child(5),
.pl-users-table td:nth-child(5) { width: 15%; }

.pl-users-table th:nth-child(6),
.pl-users-table td:nth-child(6) { width: 12%; }

.pl-date-text {
    display: block;
    color: var(--pl-muted);
    font-size: 13px;
    line-height: 1.35;
    white-space: normal;
}
