:root {
    --header-bg: #2f343b;
    --header-border: rgba(255,255,255,0.08);
    --text: #1f2328;
    --muted: #5f6772;
    --white: #ffffff;
    --panel: #f4f4f5;
    --line: #d8dde3;
    --blue-a: #0862df;
    --blue-b: #3ea7f0;
    --blue: #1778f2;
    --blue-dark: #0f67d8;
    --shadow: 0 10px 30px rgba(0,0,0,0.10);
    --shadow-soft: 0 6px 18px rgba(0,0,0,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
}

.site-gradient {
    background: linear-gradient(90deg, var(--blue-a) 0%, var(--blue-b) 100%);
    min-height: 100vh;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.narrow-panel {
    width: min(920px, calc(100% - 32px));
}

.site-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
}

.header-wrap {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    color: var(--white);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
}

.header-nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.header-nav a {
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    font-size: 14px;
    transition: .2s ease;
}

.header-nav a:hover,
.header-nav a.active {
    color: #fff;
}

/* HOME */
.hero-home {
    padding: 38px 0 70px;
}

.notice {
    color: rgba(255,255,255,0.95);
    margin-bottom: 26px;
    font-size: 14px;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.plan-card {
    background: rgba(250,250,252,0.97);
    border-radius: 22px;
    padding: 26px 22px 24px;
    box-shadow: var(--shadow);
    position: relative;
}

.plan-card.featured {
    transform: translateY(-8px);
}

.plan-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--blue);
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
}

.plan-name {
    text-align: center;
    color: #8d949d;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 3px;
    margin-bottom: 16px;
}

.plan-price {
    text-align: center;
    font-size: 52px;
    line-height: 1;
    color: #24282d;
    font-weight: 300;
    margin-bottom: 18px;
}

.currency {
    font-size: 28px;
}

.plan-price small {
    font-size: 15px;
}

.plan-bar {
    width: 100%;
    height: 8px;
    background: #d5dae0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 22px;
}

.plan-bar span {
    width: 4%;
    height: 100%;
    display: block;
    background: var(--blue);
}

.plan-list {
    list-style: none;
    border-top: 1px solid #d5dae0;
    padding-top: 18px;
    margin-bottom: 20px;
}

.plan-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 14px;
    line-height: 1.45;
}

.plan-list li::before {
    content: '✔';
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
}

/* LOGIN / FORMS */
.center-screen {
    min-height: calc(100vh - 58px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px 16px 48px;
}

.panel-mode {
    min-height: calc(100vh - 58px);
}

.form-card {
    width: 100%;
    max-width: 450px;
    background: rgba(248,248,249,0.97);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.auth-card,
.renew-card {
    padding: 34px 32px;
}

.wide-card {
    max-width: 530px;
    overflow: hidden;
}

.form-card h1 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 28px;
    font-weight: 400;
}

.form-stack {
    display: grid;
    gap: 16px;
}

.form-stack label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

input, select {
    width: 100%;
    height: 44px;
    border: 1px solid #c7ced6;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 15px;
    background: #fff;
    outline: none;
}

input:focus, select:focus {
    border-color: #7eb6ff;
    box-shadow: 0 0 0 3px rgba(23,120,242,0.12);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 0 22px;
    min-height: 52px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.2px;
    transition: .2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(180deg, #1880fb, #0f6fe8);
    color: #fff;
}

.btn-dark {
    background: #2f343b;
    color: #fff;
    min-height: 40px;
    border-radius: 6px;
    letter-spacing: 0;
    font-weight: 500;
}

.btn-full {
    width: 100%;
}

.small-btn {
    min-height: 38px;
    border-radius: 6px;
    letter-spacing: 0;
}

.auth-links {
    border-top: 1px solid #d9dde2;
    margin-top: 24px;
    padding-top: 22px;
    text-align: center;
}

.auth-links p + p {
    margin-top: 10px;
}

.auth-links a {
    color: var(--blue);
    text-decoration: none;
}

/* MENU */
.panel-center {
    padding: 56px 0 70px;
}

.menu-hero {
    text-align: center;
    color: #fff;
    margin-bottom: 26px;
}

.menu-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 10px;
}

.menu-hero p {
    color: rgba(255,255,255,0.82);
}

.menu-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.menu-card {
    background: rgba(250,250,252,0.97);
    border-radius: 20px;
    min-height: 180px;
    text-decoration: none;
    color: var(--text);
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.menu-card-title {
    font-size: 28px;
    font-weight: 700;
}

.menu-card-desc {
    color: var(--muted);
    line-height: 1.5;
}

/* TABLE */
.panel-page {
    padding: 58px 0 70px;
}

.page-actions {
    display: flex;
    margin-bottom: 16px;
}

.page-actions.right {
    justify-content: flex-end;
}

.table-shell {
    background: rgba(245,245,246,0.98);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table thead th {
    background: #2f343b;
    color: #fff;
    text-align: left;
    padding: 16px 12px;
    font-weight: 600;
    border-right: 1px solid rgba(255,255,255,0.08);
}

.modern-table td {
    padding: 14px 12px;
    background: rgba(245,245,246,0.98);
    border-bottom: 1px solid #d9dde2;
    vertical-align: middle;
}

.detail-row td {
    background: #f7f7f8;
}

.font-details {
    line-height: 1.65;
}

.mono {
    font-family: Consolas, monospace;
    word-break: break-all;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.status-badge.expired {
    background: #e84855;
    color: #fff;
}

.status-badge.active {
    background: #16a34a;
    color: #fff;
}

/* DOMAIN / CDN */
.toolbar-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.45);
    margin-bottom: 16px;
}

.search-inline {
    display: flex;
    width: min(420px, 100%);
}

.search-inline input {
    border-radius: 6px 0 0 6px;
    border-right: 0;
}

.search-inline button {
    width: 46px;
    border: 0;
    background: #2f343b;
    color: white;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
}

.domain-grid {
    display: grid;
    gap: 16px;
}

.domain-card {
    display: block;
    max-width: 450px;
    background: rgba(248,248,249,0.97);
    color: var(--text);
    text-decoration: none;
    border-radius: 10px;
    padding: 22px;
    box-shadow: var(--shadow-soft);
}

.domain-card h3 {
    font-size: 20px;
    margin-bottom: 6px;
}

.domain-card p {
    color: #169a2e;
    font-weight: 600;
}

.card-top-title {
    padding: 18px 22px;
    border-bottom: 1px solid #d8dde3;
    font-size: 18px;
}

.inside-pad {
    padding: 22px;
}

.left-actions {
    display: flex;
    justify-content: flex-start;
}

.cdn-wrap {
    width: min(760px, calc(100% - 32px));
}

.alert-warning {
    background: #f2e4b7;
    border: 1px solid #e0cd92;
    border-radius: 6px;
    padding: 18px 20px;
    color: #8b6400;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.cdn-card {
    background: rgba(248,248,249,0.97);
    border-radius: 6px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.cdn-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 18px 20px;
    border-bottom: 1px solid #d8dde3;
}

.cdn-head h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.tab-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tab-links a {
    text-decoration: none;
    color: var(--blue-dark);
    padding: 10px 14px;
    border-radius: 6px;
}

.tab-links a.active {
    background: var(--blue);
    color: white;
}

/* ALERTS */
.alert-error {
    background: #ffe4e6;
    border: 1px solid #f5b2ba;
    color: #9f1239;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.alert-success {
    background: #dcfce7;
    border: 1px solid #8fe0a8;
    color: #166534;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.empty-box {
    background: rgba(248,248,249,0.97);
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: var(--shadow-soft);
}

.payment-box {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
    color: #2e3339;
}

.payment-note {
    color: #5f6772;
}

/* ICONS IGUAL AO ORIGINAL */
.icon-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.icon-form {
    display: inline-flex;
    margin: 0;
}

.icon-btn {
    color: #6b7280;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    transition: color .2s ease;
}

.icon-btn:hover {
    color: #111827;
}

.icon-btn.danger:hover {
    color: #dc2626;
}

.icon-btn i {
    font-size: 14px;
    line-height: 1;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .plans-grid,
    .menu-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 780px) {
    .header-wrap,
    .toolbar-line,
    .cdn-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .modern-table,
    .modern-table thead,
    .modern-table tbody,
    .modern-table tr,
    .modern-table th,
    .modern-table td {
        display: block;
        width: 100%;
    }

    .modern-table thead {
        display: none;
    }
}

@media (max-width: 640px) {
    .plans-grid,
    .menu-cards {
        grid-template-columns: 1fr;
    }

    .plan-card.featured {
        transform: none;
    }

    .auth-card,
    .renew-card {
        padding: 26px 20px;
    }
}
.source-box {
    margin-top: 10px;
}

.source-box:first-child {
    margin-top: 0;
}

.source-box label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: #1f2328;
}

.source-box input {
    width: 100%;
    height: 42px;
    border: 1px solid #cfd6dd;
    border-radius: 6px;
    padding: 0 12px;
    background: #fff;
    font-family: Consolas, monospace;
    font-size: 13px;
    color: #111827;
}
.source-box {
    margin-top: 10px;
}

.source-box:first-child {
    margin-top: 0;
}

.source-box label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: #1f2328;
}

.source-box input {
    width: 100%;
    height: 42px;
    border: 1px solid #cfd6dd;
    border-radius: 6px;
    padding: 0 12px;
    background: #fff;
    font-family: Consolas, monospace;
    font-size: 13px;
    color: #111827;
}
.source-box {
    margin-top: 10px;
}

.source-box:first-child {
    margin-top: 0;
}

.source-box label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: #1f2328;
}

.source-box input {
    width: 100%;
    height: 42px;
    border: 1px solid #cfd6dd;
    border-radius: 6px;
    padding: 0 12px;
    background: #fff;
    font-family: Consolas, monospace;
    font-size: 13px;
    color: #111827;
}
.create-source-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 70px 20px 40px;
}

.create-source-card {
    width: 100%;
    max-width: 540px;
    background: #ececec;
    border-radius: 18px;
    padding: 34px 34px 32px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
}

.create-source-card h1 {
    margin: 0 0 28px;
    text-align: center;
    font-size: 24px;
    font-weight: 300;
    color: #222;
}

.create-source-form label {
    display: block;
    margin-bottom: 10px;
    font-size: 16px;
    color: #222;
}

.create-source-form input[type="text"] {
    width: 100%;
    height: 40px;
    border: 1px solid #cfd6de;
    border-radius: 4px;
    padding: 0 12px;
    font-size: 16px;
    background: #fff;
    margin-bottom: 40px;
}

.btn-create-source {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #0f67ea, #1f8fff);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 3px;
    cursor: pointer;
    text-transform: uppercase;
}

.btn-create-source:hover {
    opacity: 0.95;
}

.custom-created-alert {
    position: relative;
    background: #dff0d8;
    border: 1px solid #c7e4bc;
    color: #3c763d;
    border-radius: 4px;
    padding: 18px 48px 18px 20px;
    margin: 20px 0 30px;
    font-size: 16px;
    line-height: 1.7;
}

.custom-created-alert a {
    color: #0f67ea;
    text-decoration: none;
}

.custom-created-alert a:hover {
    text-decoration: underline;
}

.alert-close {
    position: absolute;
    top: 10px;
    right: 16px;
    font-size: 30px;
    line-height: 1;
    color: #7fa07a;
    cursor: default;
}
.renew-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 65px 20px 40px;
}

.renew-card {
    width: 100%;
    max-width: 520px;
    background: #ececec;
    border-radius: 18px;
    padding: 36px 32px 32px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
}

.renew-card h1 {
    margin: 0 0 28px;
    text-align: center;
    font-size: 24px;
    font-weight: 300;
    color: #222;
}

.renew-card label {
    display: block;
    margin: 0 0 10px;
    font-size: 16px;
    color: #222;
}

.renew-card select {
    width: 100%;
    height: 38px;
    border: 1px solid #cfd6de;
    border-radius: 4px;
    padding: 0 14px;
    font-size: 16px;
    background: #fff;
    margin-bottom: 18px;
}

.renew-summary {
    margin: 18px 0 28px;
}

.renew-connections-line {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2b2b2b;
    font-size: 18px;
    margin-bottom: 16px;
}

.renew-total {
    font-size: 18px;
    color: #222;
}

.btn-renew-submit {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #0f67ea, #1f8fff);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    text-transform: uppercase;
}