/* =============================================
   TutorCRM — публичные стили
   ============================================= */

.tutor-crm-wrap,
.tutor-crm-dashboard {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #1f2937;
    box-sizing: border-box;
}

.tutor-crm-wrap *,
.tutor-crm-dashboard * {
    box-sizing: border-box;
}

/* =============================================
   Формы (регистрация, вход)
   ============================================= */

.tutor-crm-form {
    max-width: 420px;
    margin: 0 auto;
    padding: 36px 30px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.tutor-crm-form label {
    display: block;
    margin-bottom: 16px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.tutor-crm-form input {
    display: block;
    width: 100%;
    padding: 10px 12px;
    margin-top: 6px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    background: #ffffff;
    color: #1f2937;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tutor-crm-form input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.tutor-crm-form .tc-btn {
    width: 100%;
    margin-top: 8px;
    padding: 12px 20px;
    font-size: 15px;
}

.tutor-crm-form > p {
    text-align: center;
    margin: 20px 0 0;
    font-size: 14px;
    color: #6b7280;
}

.tutor-crm-form > p a {
    color: #0073aa;
    text-decoration: none;
}

.tutor-crm-form > p a:hover {
    text-decoration: underline;
}

/* =============================================
   Кнопки
   ============================================= */

.tc-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    border: 1px solid #0073aa;
    background: #ffffff;
    color: #0073aa;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    box-sizing: border-box;
    text-align: center;
    font-family: inherit;
}

.tc-btn:hover {
    background: #f0f7ff;
}

.tc-btn-primary {
    background: #0073aa;
    color: #ffffff;
    border-color: #0073aa;
}

.tc-btn-primary:hover {
    background: #005a87;
    border-color: #005a87;
    color: #ffffff;
}

.tc-btn-secondary {
    border-color: #d1d5db;
    color: #6b7280;
    background: #ffffff;
}

.tc-btn-secondary:hover {
    background: #f9fafb;
    color: #374151;
}

.tc-btn-icon {
    background: none;
    border: none;
    color: #0073aa;
    cursor: pointer;
    text-decoration: underline;
    font-size: 14px;
    padding: 4px 6px;
    font-family: inherit;
}

.tc-btn-icon:hover {
    color: #005a87;
}

/* =============================================
   Тарифы
   ============================================= */

.tutor-crm-tariffs h2 {
    text-align: center;
    margin: 0 0 30px;
    font-size: 26px;
    color: #111827;
}

.tc-tariffs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1080px;
    margin: 0 auto;
}

@media (min-width: 900px) {
    .tc-tariffs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tc-tariff-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px 22px 24px;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
}

.tc-tariff-card:hover {
    border-color: #0073aa;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.tc-tariff-card.featured {
    border-color: #0073aa;
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.15);
}

.tc-tariff-card.featured::before {
    content: 'Популярный';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #0073aa;
    color: #ffffff;
    padding: 3px 14px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.tc-tariff-card h3 {
    margin: 0 0 6px;
    font-size: 22px;
    color: #111827;
    font-weight: 700;
    text-align: center;
}

.tc-tariff-limit {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

/* Блок цены */
.tc-tariff-price-block {
    text-align: center;
    padding: 12px 0 18px;
    border-bottom: 1px dashed #e5e7eb;
    margin-bottom: 18px;
}

.tc-tariff-price-main {
    font-size: 34px;
    font-weight: 700;
    color: #0073aa;
    line-height: 1.1;
    white-space: nowrap;
}

.tc-tariff-price-main .tc-price-unit {
    font-size: 16px;
    font-weight: 500;
    color: #6b7280;
    margin-left: 2px;
}

.tc-tariff-price-note {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    letter-spacing: 0.2px;
}

.tc-tariff-price-alt {
    font-size: 13px;
    color: #374151;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
}

/* Список возможностей */
.tc-tariff-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    flex-grow: 1;
}

.tc-tariff-features li {
    position: relative;
    padding: 6px 0 6px 26px;
    font-size: 14px;
    color: #374151;
    line-height: 1.45;
}

.tc-tariff-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 11px;
    width: 16px;
    height: 16px;
    background-color: #dcfce7;
    border-radius: 50%;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2316a34a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='3.5,8.5 6.5,11.5 12.5,5'/></svg>");
    background-size: 12px 12px;
    background-repeat: no-repeat;
    background-position: center;
}

.tc-tariff-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tc-tariff-actions .tc-btn {
    width: 100%;
}

/* =============================================
   Дашборд
   ============================================= */

.tc-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 20px;
}

.tc-tariff-bar {
    background: #f0f7ff;
    border-left: 4px solid #0073aa;
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: #1f2937;
}

.tc-tariff-bar strong {
    color: #0073aa;
}

.tc-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.tc-widget {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.15s ease;
}

.tc-widget:hover {
    border-color: #0073aa;
}

.tc-widget-value {
    font-size: 28px;
    font-weight: 700;
    color: #0073aa;
    line-height: 1.2;
}

.tc-widget-label {
    color: #6b7280;
    font-size: 13px;
    margin-top: 6px;
}

.tc-tabs {
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tc-tab {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 15px;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s ease, border-color 0.15s ease;
    font-family: inherit;
}

.tc-tab:hover {
    color: #0073aa;
}

.tc-tab.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
    font-weight: 500;
}

.tc-tab-content {
    display: none;
}

.tc-tab-content.active {
    display: block;
    animation: tc-fade-in 0.2s ease;
}

@keyframes tc-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tc-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.tc-table th,
.tc-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.tc-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.tc-table tr:last-child td {
    border-bottom: none;
}

.tc-table tr:hover td {
    background: #f9fafb;
}

/* =============================================
   Модалки
   ============================================= */

.tc-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tc-modal-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.tc-modal-content h2 {
    margin: 0 0 20px;
    font-size: 20px;
    color: #111827;
}

.tc-modal-content label {
    display: block;
    margin-bottom: 14px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.tc-modal-content input,
.tc-modal-content textarea,
.tc-modal-content select {
    width: 100%;
    padding: 9px 12px;
    margin-top: 5px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    background: #ffffff;
    color: #1f2937;
}

.tc-modal-content input:focus,
.tc-modal-content textarea:focus,
.tc-modal-content select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.tc-modal-content textarea {
    min-height: 80px;
    resize: vertical;
}

.tc-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* =============================================
   Адаптив
   ============================================= */

@media (max-width: 600px) {
    .tutor-crm-wrap,
    .tutor-crm-dashboard {
        margin: 15px auto;
        padding: 0 14px;
    }
    
    .tutor-crm-form {
        padding: 24px 20px;
    }
    
    .tc-tariff-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tc-widget-value {
        font-size: 22px;
    }
    
    .tc-table th,
    .tc-table td {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .tc-tab {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .tc-modal-content {
        padding: 22px;
    }
    
    .tc-tariff-price-main {
        font-size: 30px;
    }
}