/**
 * Furgonetka Demo - Style CSS
 */

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

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

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
}

.header h1 {
    margin: 0;
    font-size: 24px;
    color: #1a73e8;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.status.connected {
    background: #e8f5e9;
    color: #2e7d32;
}

.nav-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.nav-tab {
    padding: 12px 20px;
    text-decoration: none;
    color: #666;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.nav-tab:hover { color: #1a73e8; }

.nav-tab.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
    font-weight: 500;
}

.main-content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.main-content h2 { margin-top: 0; }

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary { background: #1a73e8; color: #fff; }
.btn-primary:hover { background: #1557b0; }
.btn-secondary { background: #f1f3f4; color: #333; }
.btn-secondary:hover { background: #e0e0e0; }
.btn-info { background: #00bcd4; color: #fff; }
.btn-info:hover { background: #00acc1; }
.btn-danger { background: #dc3545; color: #fff; }
.btn-danger:hover { background: #c82333; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.table th, .table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.table th { background: #f8f9fa; font-weight: 600; }
.table tr:hover { background: #f8f9fa; }

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

.badge-info { background: #e3f2fd; color: #1565c0; }
.badge-warning { background: #fff3e0; color: #ef6c00; }
.badge-success { background: #e8f5e9; color: #2e7d32; }

.pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.page-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    border: 2px solid transparent;
}

.page-card:hover {
    background: #e3f2fd;
    border-color: #1a73e8;
    transform: translateY(-2px);
}

.page-card-icon { font-size: 32px; margin-bottom: 10px; }
.page-card-name { font-weight: 500; text-align: center; }

.quick-actions { display: flex; gap: 15px; flex-wrap: wrap; }

.info-box {
    background: #e3f2fd;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.info-box h3 { margin-top: 0; color: #1565c0; }

.text-muted { color: #666; }

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
}

.modal-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.modal-container {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 1000px;
    height: 100%;
    max-height: 900px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.modal-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover { background: #333; }

/* LOADER */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: #1a73e8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* CONNECT PAGE */
.connect-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
}

.connect-container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

.connect-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.connect-logo { font-size: 64px; text-align: center; margin-bottom: 10px; }

.connect-card h1 { text-align: center; margin: 0 0 10px; }

.connect-card > .text-muted { text-align: center; display: block; margin-bottom: 30px; }

.connect-actions { margin: 30px 0; }

.connect-info { margin-top: 30px; }
.connect-info h3 { font-size: 14px; color: #666; margin-bottom: 15px; }
.connect-info ul { list-style: none; padding: 0; margin: 0; }
.connect-info li { padding: 8px 0; }

.connect-help { margin-top: 20px; }
.connect-help h4 { color: #666; font-size: 14px; }
.connect-help code { background: #f1f3f4; padding: 2px 6px; border-radius: 4px; font-size: 13px; }

/* CODE EXAMPLES */
.example-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e0e0e0;
}

.example-section:last-child { border-bottom: none; }
.example-section h3 { color: #1a73e8; }

.code-example { margin: 20px 0; }
.code-example h4 { font-size: 14px; color: #666; margin-bottom: 10px; }

.code-example pre {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    overflow-x: auto;
    margin: 0;
}

.demo-link { margin-top: 20px; }

.pages-list {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 6px;
    font-family: monospace;
    line-height: 2;
}

.pages-list code {
    background: #e3f2fd;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 10px;
}
