/* Web Interface Styles */
:root {
    --primary: #4dabf7;
    --primary-dark: #339af0;
    --secondary: #51cf66;
    --danger: #ff6b6b;
    --dark: #212529;
    --light: #f8f9fa;
    --border: #dee2e6;
    --text: #212529;
    --text-light: #6c757d;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background-color: #f5f7fa;
    line-height: 1.6;
}

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

/* Navigation */
.web-nav {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.web-nav .web-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

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

.nav-menu a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 15px;
    background: var(--light);
    border-radius: 8px;
}

.nav-user-name {
    color: var(--dark);
    font-weight: 600;
    font-size: 14px;
}

.nav-logout-btn {
    background: var(--danger) !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}

.nav-logout-btn:hover {
    background: #c82333 !important;
    transform: translateY(-1px);
}

.nav-button {
    background: var(--primary);
    color: white !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
}

.nav-button:hover {
    background: var(--primary-dark);
    color: white !important;
}

.nav-link-secondary {
    color: var(--text-light) !important;
}

/* Main Content */
.web-main {
    min-height: calc(100vh - 400px);
    padding: 40px 0;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Section */
.features-section {
    padding: 60px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--dark);
}

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

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--dark);
}

.feature-card p {
    color: var(--text-light);
}

/* Plans Section */
.plans-preview-section {
    padding: 60px 0;
    background: var(--light);
}

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

.plan-card {
    background: white;
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.plan-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.plan-featured {
    border: 3px solid var(--primary);
}

.plan-badge {
    position: absolute;
    top: -15px;
    right: 20px;
    background: var(--secondary);
    color: #000;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-shadow: none;
}

.plan-header h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.plan-desc {
    color: var(--text-light);
    margin-bottom: 25px;
}

.plan-price {
    margin-bottom: 30px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
}

.price-amount {
    font-size: 42px;
    font-weight: bold;
    color: var(--primary);
}

.price-from, .price-period {
    color: var(--text-light);
    font-size: 16px;
}

.plan-features {
    list-style: none;
    text-align: left;
}

.plan-features li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.plan-features li:last-child {
    border-bottom: none;
}

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

/* CTA Section */
.cta-section {
    background: var(--primary);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 16px;
}

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

.button-primary:hover {
    background: var(--primary-dark);
}

.button-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.button-secondary:hover {
    background: var(--primary);
    color: white;
}

.button-large {
    padding: 15px 40px;
    font-size: 18px;
}

.button-small {
    padding: 8px 16px;
    font-size: 14px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error, .alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-card {
    background: white;
    padding: 50px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.login-card h1 {
    margin-bottom: 15px;
    color: var(--dark);
}

.login-subtitle {
    color: var(--text-light);
    margin-bottom: 40px;
}

.login-widget {
    margin: 40px 0;
    display: flex;
    justify-content: center;
}

.login-info {
    text-align: left;
    margin: 40px 0;
    padding: 20px;
    background: var(--light);
    border-radius: 8px;
}

.login-info h3 {
    margin-bottom: 15px;
}

.login-info ul {
    list-style: none;
}

.login-info li {
    padding: 8px 0;
}

.login-help, .login-bot {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

/* Cabinet */
.cabinet-page {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.cabinet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.cabinet-menu {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    overflow-x: auto;
}

.cabinet-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    background: var(--light);
    transition: all 0.3s;
    white-space: nowrap;
}

.cabinet-menu-item:hover {
    background: var(--primary);
    color: white;
}

.cabinet-menu-item.active {
    background: var(--primary);
    color: white;
}

.menu-icon {
    font-size: 20px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    font-size: 40px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* Section Card */
.section-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.section-card h2 {
    margin-bottom: 25px;
    color: var(--dark);
}

/* Keys List */
.keys-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.key-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--light);
    border-radius: 8px;
    transition: transform 0.2s;
}

.key-item:hover {
    transform: translateX(5px);
}

.key-name {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.key-date {
    font-size: 14px;
    color: var(--text-light);
}

.key-details {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.key-tag {
    background: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--primary);
    border: 1px solid var(--primary);
}

/* Key Card */
.key-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    overflow: hidden;
}

.key-card-header {
    background: var(--primary);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.key-status {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.key-status-active {
    background: var(--secondary);
    color: #000;
}

.key-card-body {
    padding: 30px;
}

.key-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.key-detail-label {
    color: var(--text-light);
    font-weight: 600;
}

.key-detail-value {
    color: var(--dark);
}

.key-config-section {
    margin-top: 25px;
}

.key-config-box {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.key-config-text {
    flex: 1;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: monospace;
    font-size: 12px;
    min-height: 100px;
    resize: vertical;
}

.key-qr-section {
    margin-top: 20px;
}

.qr-container {
    margin-top: 20px;
    padding: 20px;
    background: var(--light);
    border-radius: 8px;
    text-align: center;
}

.key-card-footer {
    padding: 20px 30px;
    background: var(--light);
    display: flex;
    justify-content: center;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 25px;
    background: var(--light);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
}

.action-button:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
}

.action-icon {
    font-size: 36px;
}

.action-text {
    font-weight: 600;
    text-align: center;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state-large {
    text-align: center;
    padding: 100px 20px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.empty-state-large h2 {
    margin-bottom: 15px;
    color: var(--dark);
}

.empty-state-large p {
    color: var(--text-light);
    margin-bottom: 30px;
}

/* Footer */
.web-footer {
    background: var(--dark);
    color: white;
    padding: 50px 0 20px;
    margin-top: 80px;
}

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

.footer-section h4 {
    margin-bottom: 20px;
    color: var(--primary);
}

.footer-section p {
    opacity: 0.8;
    margin-bottom: 10px;
}

.footer-section a {
    color: white;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .cabinet-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .key-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .login-card {
        padding: 30px 20px;
    }
}
