:root {
    --primary-color: #0078d4;
    --primary-hover: #005a9e;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --accent-color: #6366f1;
    --error-color: #ef4444;
    --success-color: #10b981;
    --border-radius: 12px;
    --box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    background: var(--card-bg);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    z-index: 10;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.logo span {
    color: var(--primary-color);
    font-weight: 400;
}

.status-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #e2e8f0;
    color: var(--text-muted);
}

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

.status-badge.error {
    background: #fee2e2;
    color: #991b1b;
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
}

.screen {
    text-align: center;
    max-width: 500px;
    padding: 3rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    animation: fadeIn 0.5s ease-out;
}

.hidden {
    display: none !important;
}

h2 {
    margin-bottom: 1rem;
    font-weight: 600;
}

p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.primary-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

.secondary-btn {
    background: #f1f5f9;
    color: var(--text-color);
    border: 1px solid #e2e8f0;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
}

.report-container {
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: white;
    box-shadow: var(--box-shadow);
    animation: scaleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

iframe {
    border: none !important;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--primary-color);
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin-bottom: 1.5rem;
}

.error-icon {
    width: 60px;
    height: 60px;
    background: var(--error-color);
    color: white;
    font-size: 2.5rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.rls-config {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f1f5f9;
    border-radius: 8px;
    text-align: left;
}

.rls-config h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.config-desc {
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.1);
}

footer {
    padding: 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}
