/* Основные стили */
:root {
    --cp-primary: #90EE90;
    --cp-secondary: #FFB6C1;
    --cp-bg: #F5F5DC;
    --cp-dark: #2c3e50;
    --cp-text: #333;
    --cp-border: #ddd;
    --cp-sidebar-bg: #34495e;
}

/* Сброс и базовые стили */
.cp-modal, .cp-planner-container, .cp-cabinet, .cp-create-project, .cp-tariffs-page, .cp-dashboard, .cp-welcome {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--cp-text);
}

/* Модальные окна */
.cp-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    overflow: auto;
}

.cp-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.cp-modal-dark {
    background-color: #2c3e50;
    color: white;
}

.cp-modal-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.cp-modal-dark .cp-modal-close {
    color: #fff;
}

/* Формы */
.cp-form {
    margin-top: 20px;
}

.cp-form-row {
    margin-bottom: 15px;
}

.cp-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.cp-form-row input[type="text"],
.cp-form-row input[type="email"],
.cp-form-row input[type="tel"],
.cp-form-row input[type="password"],
.cp-form-row input[type="number"],
.cp-form-row textarea,
.cp-form-row select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--cp-border);
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.cp-password-field {
    position: relative;
}

.cp-toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

/* Кнопки */
.cp-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f0f0f0;
    border: 1px solid var(--cp-border);
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    color: var(--cp-text);
    font-size: 14px;
    transition: all 0.3s;
}

.cp-btn:hover {
    background-color: #e0e0e0;
}

.cp-btn-primary {
    background-color: var(--cp-primary);
    border-color: var(--cp-primary);
    color: #2c3e50;
    font-weight: 600;
}

.cp-btn-primary:hover {
    background-color: #7dd87d;
}

.cp-btn-danger {
    background-color: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.cp-btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.cp-btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

/* Капча */
.cp-captcha-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.cp-captcha-img {
    border: 1px solid var(--cp-border);
    border-radius: 4px;
    cursor: pointer;
    height: 50px;
}

/* Личный кабинет */
.cp-cabinet {
    display: flex;
    min-height: 600px;
    background: #f9f9f9;
}

.cp-cabinet-sidebar {
    width: 280px;
    background: var(--cp-sidebar-bg);
    color: white;
    padding: 30px;
}

.cp-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--cp-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--cp-dark);
}

.cp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cp-secondary);
}

.cp-cabinet-menu {
    margin-top: 30px;
}

.cp-cabinet-menu a {
    display: block;
    padding: 12px 15px;
    color: #ecf0f1;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 5px;
    transition: all 0.3s;
}

.cp-cabinet-menu a:hover,
.cp-cabinet-menu a.active {
    background: var(--cp-primary);
    color: var(--cp-dark);
}

.cp-cabinet-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.cp-tab {
    display: none;
}

.cp-tab.active {
    display: block;
}

/* Проекты */
.cp-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.cp-project-card {
    background: white;
    border: 1px solid var(--cp-border);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cp-project-card h4 {
    margin-top: 0;
    color: var(--cp-dark);
}

.cp-project-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

/* Тарифы */
.cp-tariffs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.cp-tariff-card {
    background: white;
    border: 2px solid var(--cp-border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    position: relative;
    transition: transform 0.3s;
}

.cp-tariff-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.cp-tariff-card.current {
    border-color: var(--cp-primary);
    background: #f0fff0;
}

.cp-promo-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: #e74c3c;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.cp-price {
    margin: 20px 0;
}

.cp-old-price {
    color: #999;
    font-size: 18px;
    display: block;
}

.cp-current-price {
    font-size: 36px;
    font-weight: bold;
    color: var(--cp-dark);
}

.cp-period {
    color: #666;
    margin-bottom: 20px;
}

.cp-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.cp-features li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    padding-left: 25px;
    position: relative;
}

.cp-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--cp-primary);
    font-weight: bold;
}

/* Планировщик */
.cp-planner-container {
    display: flex;
    height: calc(100vh - 100px);
    background: var(--cp-bg);
}

.cp-planner-sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid var(--cp-border);
    padding: 20px;
    overflow-y: auto;
}

.cp-tool-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.cp-tool-section h4 {
    margin-top: 0;
    color: var(--cp-dark);
}

.cp-camera-drag {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid var(--cp-border);
    border-radius: 4px;
    margin-bottom: 10px;
    cursor: move;
    transition: all 0.2s;
}

.cp-camera-drag:hover {
    background: var(--cp-primary);
    border-color: var(--cp-primary);
}

.cp-tool-btn {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    text-align: left;
    padding-left: 15px;
}

.cp-tool-btn.active {
    background: var(--cp-secondary);
    border-color: var(--cp-secondary);
}

.cp-setting-row {
    margin-bottom: 15px;
}

.cp-setting-row label {
    display: block;
    font-size: 12px;
    margin-bottom: 5px;
    color: #666;
}

.cp-setting-row input {
    width: 100%;
}

.cp-planner-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cp-planner-toolbar {
    background: white;
    padding: 10px 20px;
    border-bottom: 1px solid var(--cp-border);
    display: flex;
    align-items: center;
    gap: 15px;
}

#cp-zoom-level {
    min-width: 50px;
    text-align: center;
    font-weight: 600;
}

.cp-canvas-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #e8e8e8;
}

#cp-planner-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Адаптивность */
@media (max-width: 768px) {
    .cp-cabinet {
        flex-direction: column;
    }
    
    .cp-cabinet-sidebar {
        width: 100%;
    }
    
    .cp-planner-container {
        flex-direction: column;
        height: auto;
    }
    
    .cp-planner-sidebar {
        width: 100%;
        max-height: 200px;
    }
    
    .cp-tariffs-grid {
        grid-template-columns: 1fr;
    }
}

/* Утилиты */
.cp-hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

/* Сообщения */
.cp-notice {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.cp-notice-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cp-notice-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}