/* easyClaw Web UI Styles */

:root {
    --primary: #FF6B35;
    --secondary: #004E89;
    --success: #06A77D;
    --danger: #D62828;
    --warning: #F77F00;
    --light: #F8F9FA;
    --dark: #212529;
    --border: #DEE2E6;
    --text: #333;
    --text-light: #6C757D;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--light);
}

/* Form Layouts */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.card-wide {
    grid-column: 1 / -1;
}

.avatar-preview {
    margin: 0.5rem 0;
}

.avatar-preview img {
    max-width: 100px;
    border-radius: 8px;
    border: 2px solid var(--border);
}

/* Navbar */
.navbar {
    background: white;
    border-bottom: 2px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    height: 32px;
    width: auto;
}

.logo-large {
    height: 80px;
    width: auto;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.nav-link:hover {
    background: var(--light);
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

.nav-link.logout {
    color: var(--danger);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card h2 {
    margin-bottom: 1rem;
    color: var(--secondary);
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #E55A2A;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: #003D6F;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.required {
    color: var(--danger);
}

.optional {
    color: var(--text-light);
    font-weight: normal;
}

/* Status Indicators */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
}

.status-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-light.active {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-light.inactive {
    background: var(--text-light);
}

.status-text {
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.active {
    background: #D1FAE5;
    color: #065F46;
}

.status-badge.inactive {
    background: #E5E7EB;
    color: #6B7280;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-warning {
    background: #FFF3CD;
    border: 1px solid #FFECB5;
    color: #856404;
}

.alert-error {
    background: #F8D7DA;
    border: 1px solid #F5C2C7;
    color: #842029;
}

.alert-success {
    background: #D1E7DD;
    border: 1px solid #BADBCC;
    color: #0F5132;
}

/* Login Page */
.login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
}

.login-container {
    background: white;
    border-radius: 8px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: var(--secondary);
    margin: 1rem 0 0.5rem;
}

.tagline {
    color: var(--text-light);
    font-size: 0.875rem;
}

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

.login-footer {
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Setup Wizard */
.setup-wizard {
    max-width: 800px;
    margin: 0 auto;
}

.wizard-header {
    text-align: center;
    margin-bottom: 2rem;
}

.wizard-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
}

.wizard-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border);
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.step.active .step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.step.completed .step-number {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step-label {
    font-size: 0.875rem;
    color: var(--text-light);
}

.wizard-content {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: space-between;
}

/* Info boxes */
.info-box,
.success-box {
    background: #E7F3FF;
    border: 1px solid #B3D9FF;
    border-radius: 4px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.success-box {
    background: #D1FAE5;
    border-color: #A7F3D0;
}

/* Channel Options */
.channel-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.channel-option input[type="radio"] {
    display: none;
}

.channel-option label {
    display: block;
    padding: 1.5rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.channel-option input:checked + label {
    border-color: var(--primary);
    background: #FFF5F0;
}

.channel-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Channels Grid */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.channel-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.channel-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.channel-card .channel-icon {
    font-size: 2rem;
}

.channel-header h2 {
    flex: 1;
    margin: 0;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
}

.vps-info {
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

/* Checklist */
.checklist {
    list-style: none;
}

.checklist li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.check::before {
    content: '✓';
    color: var(--success);
    font-weight: bold;
}

.cross::before {
    content: '✗';
    color: var(--danger);
    font-weight: bold;
}

/* Stats */
.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0.5rem 0;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.stat-row:last-child {
    border-bottom: none;
}

/* Tables */
.info-table {
    width: 100%;
}

.info-table td {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.info-table tr:last-child td {
    border-bottom: none;
}

/* Help */
.help-sections {
    display: grid;
    gap: 2rem;
}

.help-section {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.faq details {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.faq summary {
    cursor: pointer;
    font-weight: 500;
}

.faq details p {
    margin-top: 0.5rem;
    color: var(--text-light);
}

pre {
    background: var(--dark);
    color: #00FF00;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
}

code {
    font-family: 'Courier New', monospace;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .container {
        padding: 0 1rem;
    }

    .grid,
    .channels-grid {
        grid-template-columns: 1fr;
    }

    .wizard-progress {
        font-size: 0.75rem;
    }

    .step-label {
        display: none;
    }
}
