*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

/* ─── Animations ─── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-10px)
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Landing Page ─── */
.landing {
    display: none;
}

.landing.active {
    display: block;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: 0.3s;
}

.navbar.scrolled {
    border-bottom-color: #e2e8f0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.navbar .logo {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
}

.navbar .logo span {
    color: #4f46e5;
}

.navbar .nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar .nav-links a {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: 0.2s;
}

.navbar .nav-links a:hover {
    color: #4f46e5;
}

.navbar .nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: #4f46e5;
    color: #fff;
}

.btn-primary:hover {
    background: #4338ca;
}

.btn-outline {
    background: transparent;
    color: #4f46e5;
    border: 1.5px solid #e0e7ff;
}

.btn-outline:hover {
    background: #f8faff;
    border-color: #4f46e5;
}

.btn-danger-sm {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #dc2626;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 11px;
}

.btn-danger-sm:hover {
    background: #fee2e2;
}

.btn-sm {
    padding: 7px 14px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
    border-radius: 10px;
}

.btn-success {
    background: #10b981;
    color: #fff;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-ghost {
    background: transparent;
    color: #64748b;
    padding: 6px 10px;
    font-size: 13px;
}

.btn-ghost:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8faff 0%, #eef2ff 100%);
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
    margin-bottom: 18px;
}

.hero h1 span {
    color: #4f46e5;
}

.hero p {
    font-size: clamp(15px, 2vw, 17px);
    color: #475569;
    margin-bottom: 28px;
    max-width: 500px;
}

.hero .cta-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero .stats {
    display: flex;
    gap: 30px;
    margin-top: 40px;
}

.hero .stats div {
    text-align: center;
}

.hero .stats .num {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
}

.hero .stats .label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.hero .hero-img {
    text-align: center;
}

.hero .hero-img .mock {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(79, 70, 229, 0.12);
    border: 1px solid #e0e7ff;
    animation: float 4s ease-in-out infinite;
}

.hero .hero-img .mock .dot-group {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.hero .hero-img .mock .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.hero .hero-img .mock .dot.r {
    background: #ef4444;
}

.hero .hero-img .mock .dot.y {
    background: #f59e0b;
}

.hero .hero-img .mock .dot.g {
    background: #10b981;
}

.hero .hero-img .mock .row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}

.hero .hero-img .mock .row:last-child {
    border-bottom: none;
}

.live-row {
    animation: slideIn 0.4s ease both;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.badge-pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.mock-badge {
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.mock-badge.up {
    background: #dcfce7;
    color: #166534;
}

.mock-badge.down {
    background: #fef2f2;
    color: #991b1b;
}

.mock-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
}

.mock-badge.up {
    background: #dcfce7;
    color: #166534;
}

.mock-badge.down {
    background: #fef2f2;
    color: #991b1b;
}

/* Sections */
section {
    padding: 80px 0;
}

section .section-title {
    font-size: clamp(24px, 3.5vw, 36px);
    font-weight: 800;
    color: #0f172a;
    text-align: center;
    margin-bottom: 12px;
}

section .section-sub {
    font-size: 15px;
    color: #64748b;
    text-align: center;
    max-width: 600px;
    margin: 0 auto 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.feature-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    transition: 0.3s;
}

.feature-card:hover {
    border-color: #a5b4fc;
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.08);
    transform: translateY(-2px);
}

.feature-card .icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.7;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    counter-reset: step;
}

.step {
    text-align: center;
    padding: 24px;
    position: relative;
}

.step .num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e0e7ff;
    color: #4338ca;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    margin: 0 auto 14px;
}

.step h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.step p {
    font-size: 13px;
    color: #64748b;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.pricing-card {
    background: #fff;
    border-radius: 14px;
    padding: 28px 22px;
    border: 2px solid #e2e8f0;
    transition: 0.3s;
    position: relative;
}

.pricing-card:hover {
    border-color: #a5b4fc;
}

.pricing-card.featured {
    border-color: #4f46e5;
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.12);
}

.pricing-card .popular-tag {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #4f46e5;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 14px;
    border-radius: 100px;
}

.pricing-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.pricing-card .price {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}

.pricing-card .price small {
    font-size: 13px;
    font-weight: 400;
    color: #94a3b8;
}

.pricing-card .price-desc {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 2.2;
    color: #475569;
}

.pricing-card ul li .soon {
    font-size: 10px;
    background: #fef3c7;
    color: #92400e;
    padding: 1px 6px;
    border-radius: 4px;
}

.review-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    border: 1px solid #e2e8f0;
}

.review-card .stars {
    color: #f59e0b;
    font-size: 16px;
    margin-bottom: 6px;
}

.review-card p {
    font-size: 13px;
    color: #475569;
    margin-bottom: 8px;
}

.review-card .meta {
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
}

.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.roadmap-item {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}

.roadmap-item h4 {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.roadmap-item p {
    font-size: 12px;
    color: #64748b;
}

.roadmap-item .tag {
    font-size: 10px;
    background: #fef3c7;
    color: #92400e;
    padding: 1px 6px;
    border-radius: 4px;
}

.footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 40px 0 24px;
}

.footer .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer h4 {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}

.footer a {
    color: #94a3b8;
    font-size: 12px;
    text-decoration: none;
    display: block;
    margin-bottom: 6px;
}

.footer a:hover {
    color: #fff;
}

.footer .copy {
    text-align: center;
    font-size: 12px;
    padding-top: 20px;
    border-top: 1px solid #1e293b;
}

/* ─── Auth Modal ─── */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: fadeIn 0.2s ease;
}

.modal h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.modal-close {
    float: right;
    background: none;
    border: none;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #475569;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
    background: #fff;
}

.form-error {
    background: #fef2f2;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
    border: 1px solid #fecaca;
    display: none;
}

.form-error.show {
    display: block;
}

.auth-toggle {
    text-align: center;
    font-size: 14px;
    color: #64748b;
    margin-top: 16px;
}

.auth-toggle button {
    background: none;
    border: none;
    color: #4f46e5;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.auth-toggle button:hover {
    text-decoration: underline;
}

/* ─── Dashboard ─── */
#dashboard {
    display: none;
}

#dashboard.active {
    display: block;
    padding-top: 0;
}

.dash-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    margin-bottom: 18px;
    gap: 12px;
    flex-wrap: wrap;
}

.topbar .brand {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.topbar .brand span {
    color: #4f46e5;
}

.topbar .user-area {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.topbar .user-area .email {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.plan-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    background: #e0e7ff;
    color: #4338ca;
    text-transform: capitalize;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    padding: 20px;
    margin-bottom: 16px;
}

.card h2 {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 12px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.card-header h2 {
    margin-bottom: 0;
}

.inline-form {
    display: flex;
    gap: 10px;
}

.inline-form input {
    flex: 1;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: #f8fafc;
    transition: 0.2s;
}

.inline-form input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
    background: #fff;
}

.table-wrapper {
    overflow-x: auto;
}

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

thead th {
    text-align: left;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

tbody td {
    padding: 12px;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

tbody tr:hover {
    background: #f8fafc;
}

.url-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 13px;
}

.time-cell {
    color: #64748b;
    font-size: 13px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

.badge-up {
    background: #dcfce7;
    color: #166534;
}

.badge-down {
    background: #fef2f2;
    color: #991b1b;
}

.badge-unknown {
    background: #f1f5f9;
    color: #475569;
}

.empty-state {
    text-align: center;
    padding: 30px 20px;
    color: #94a3b8;
}

.loading {
    text-align: center;
    padding: 30px;
    color: #94a3b8;
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid #e2e8f0;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

.toggle {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    border-radius: 20px;
    transition: 0.25s;
}

.toggle .slider::before {
    content: '';
    position: absolute;
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.25s;
}

.toggle input:checked+.slider {
    background: #10b981;
}

.toggle input:checked+.slider::before {
    transform: translateX(18px);
}

.btn-danger-sm {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-danger-sm:hover {
    background: #fecaca;
}

.ping-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #94a3b8;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.ping-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.ping-dot.active {
    background: #10b981;
}

.ping-dot.inactive {
    background: #94a3b8;
}

.flex {
    display: flex;
}

.flex-center {
    align-items: center;
}

.gap-8 {
    gap: 8px;
}

.gap-12 {
    gap: 12px;
}

.text-center {
    text-align: center;
}

.mt-12 {
    margin-top: 12px;
}

.w-full {
    width: 100%;
}

#starRating span:hover,
#starRating span.hovered {
    color: #f59e0b !important;
}

#starRating span.selected {
    color: #f59e0b !important;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #0f172a;
}

.nav-mobile {
    display: none;
}

/* ─── Responsive ─── */
@media (max-width:768px) {
    .navbar .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .nav-mobile {
        display: flex;
        flex-direction: column;
        gap: 10px;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid #e2e8f0;
        padding: 16px 24px;
        z-index: 99;
        transform: translateY(-100%);
        opacity: 0;
        transition: 0.3s;
    }

    .nav-mobile.open {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-mobile a {
        font-size: 14px;
        color: #475569;
        text-decoration: none;
        padding: 6px 0;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero .cta-group {
        justify-content: center;
    }

    .hero .stats {
        justify-content: center;
    }

    .hero .hero-img .mock {
        max-width: 360px;
        margin: 0 auto;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    section {
        padding: 50px 0;
    }

    .hero {
        padding: 100px 0 50px;
        min-height: auto;
    }

    .topbar {
        flex-direction: column;
        text-align: center;
    }

    .topbar .user-area {
        justify-content: center;
    }

    .inline-form {
        flex-direction: column;
    }

    .inline-form .btn {
        width: 100%;
    }
}

@media (max-width:480px) {
    .hero .stats {
        gap: 16px;
        flex-wrap: wrap;
    }

    .hero .stats .num {
        font-size: 20px;
    }

    .modal {
        padding: 24px 16px;
    }
}

/* ─── Admin Panel ─── */
#adminPanel {
    display: none;
}

#adminPanel.active {
    display: flex;
}

.admin-layout {
    display: flex;
    min-height: calc(100vh - 56px);
}

.admin-sidebar {
    width: 220px;
    background: #1e293b;
    padding: 16px 0;
    flex-shrink: 0;
}

.admin-sidebar a {
    display: block;
    padding: 10px 20px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: #334155;
    color: #fff;
}

.admin-content {
    flex: 1;
    padding: 24px;
    background: #f1f5f9;
    overflow-x: auto;
}

.admin-content h2 {
    font-size: 20px;
    color: #0f172a;
    margin-bottom: 16px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.admin-stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 14px;
    border: 1px solid #e2e8f0;
}

.admin-stat-card .num {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}

.admin-stat-card .label {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

.admin-table-wrap {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.admin-table th {
    background: #f8fafc;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}

.admin-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    color: #0f172a;
}

.admin-table tr:hover {
    background: #fafafa;
}

.admin-period-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.admin-period-bar button {
    padding: 6px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    color: #475569;
}

.admin-period-bar button.active {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}

.chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.chart-box {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 16px;
}

.chart-box h3 {
    font-size: 14px;
    color: #0f172a;
    margin-bottom: 10px;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.admin-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.admin-badge.admin {
    background: #fef3c7;
    color: #92400e;
}

.admin-badge.user {
    background: #dbeafe;
    color: #1e40af;
}

.admin-badge.free {
    background: #f1f5f9;
    color: #475569;
}

.admin-badge.pro {
    background: #ede9fe;
    color: #6d28d9;
}

.admin-badge.enterprise {
    background: #fce7f3;
    color: #9d174d;
}

.admin-badge.up {
    background: #dcfce7;
    color: #166534;
}

.admin-badge.down {
    background: #fef2f2;
    color: #991b1b;
}

.admin-search {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    width: 220px;
    margin-bottom: 12px;
}

.admin-pagination {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 12px;
    font-size: 12px;
    color: #64748b;
}

.admin-pagination button {
    padding: 4px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 11px;
}

.admin-pagination button:disabled {
    opacity: 0.4;
    cursor: default;
}

.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
}

.admin-modal-overlay.active {
    display: flex;
}

.admin-modal {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

.admin-modal h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.admin-modal-close {
    float: right;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #94a3b8;
}

.admin-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.admin-settings-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
}

.admin-settings-item label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    display: block;
    margin-bottom: 4px;
}

.admin-settings-item input,
.admin-settings-item select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
}

.admin-settings-item .hint {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 2px;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.admin-topbar .back-btn {
    padding: 6px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    color: #475569;
}

@media(max-width:768px) {
    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        display: flex;
        overflow-x: auto;
        padding: 8px;
    }

    .admin-sidebar a {
        white-space: nowrap;
        padding: 8px 14px;
        font-size: 12px;
    }

    .chart-row {
        grid-template-columns: 1fr;
    }

    .admin-settings-grid {
        grid-template-columns: 1fr;
    }
}