/* Reset and base */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, sans-serif; font-size: 16px; line-height: 1.5; color: #333; background: #f5f5f5; }

/* Login page — green background style */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; position: relative; background: #76b852; overflow: hidden; }
.login-page-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
@keyframes login-circle-1 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-25px, 20px); }
  66% { transform: translate(15px, -15px); }
}
@keyframes login-circle-2 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(20px, -25px); }
  66% { transform: translate(-20px, 10px); }
}
.login-page-bg::before, .login-page-bg::after { content: ''; position: absolute; border-radius: 50%; border: 40px solid rgba(255,255,255,0.08); }
.login-page-bg::before { width: 280px; height: 280px; top: -80px; right: -60px; animation: login-circle-1 20s ease-in-out infinite; }
.login-page-bg::after { width: 180px; height: 180px; bottom: 10%; left: -40px; border-width: 30px; animation: login-circle-2 24s ease-in-out infinite; }
.login-page .login-box { position: relative; z-index: 1; width: 100%; max-width: 400px; background: #fff; padding: 2.5rem 2rem; border-radius: 16px; border-top-left-radius: 24px; border-top-right-radius: 24px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.login-title { margin: 0 0 0.5rem; font-size: 1.75rem; font-weight: 700; color: #333; text-align: center; }
.login-welcome { margin: 0 0 0.25rem; font-size: 1.25rem; font-weight: 700; color: #2e7d32; text-align: center; }
.login-subtitle { color: #666; margin: 0 0 1.5rem; font-size: 0.9rem; text-align: center; }
.login-box .login-error { color: #c62828; margin-bottom: 1rem; font-size: 0.9rem; text-align: center; background: #ffebee; padding: 0.5rem 0.75rem; border-radius: 8px; }
.login-form .form-group label { color: #222; font-weight: 500; }
.login-form .login-input { background: #fffde7; border: 1px solid #e6e0a0; border-radius: 10px; padding: 0.65rem 1rem; }
.login-form .login-input:focus { outline: none; border-color: #76b852; box-shadow: 0 0 0 2px rgba(118,184,82,0.3); }
.login-form .login-btn { width: 100%; padding: 0.75rem 1.5rem; font-size: 1.05rem; font-weight: 600; background: #6cb84c; color: #fff; border: none; border-radius: 10px; cursor: pointer; margin-top: 0.5rem; transition: background 0.2s; }
.login-form .login-btn:hover { background: #5a9e3d; }

@keyframes loginFadeInUp {
  0% { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

.login-box {
  animation: loginFadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.login-box > * {
  opacity: 0;
  animation: loginFadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.login-box .login-title { animation-delay: 0.1s; }
.login-box .login-welcome { animation-delay: 0.2s; }
.login-box .login-subtitle { animation-delay: 0.3s; }
.login-box .login-error { animation-delay: 0.35s; }
.login-box .login-form .form-group:nth-child(1) { animation-delay: 0.4s; }
.login-box .login-form .form-group:nth-child(2) { animation-delay: 0.5s; }
.login-box .login-form .login-btn { animation-delay: 0.6s; }

.login-box .login-form > * {
  opacity: 0;
  animation: loginFadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Layout with sidebar — modern dashboard style */
.main-header { position: fixed; top: 0; left: 0; right: 0; height: 64px; background: #ffffff; border-bottom: 1px solid #f1f5f9; display: grid; grid-template-columns: 250px 1fr; align-items: center; z-index: 100; box-shadow: 0 1px 3px rgba(0,0,0,0.02); }
.header-left-part { display: flex; align-items: center; justify-content: center; height: 100%; background: #ffffff; border-right: 1px solid #f1f5f9; }
.header-right-part { display: flex; align-items: center; height: 100%; padding: 0 1.5rem 0 1rem; gap: 1rem; }
.logo { display: flex; align-items: center; text-decoration: none; line-height: 0; transition: transform 0.2s ease; }
.logo:hover { transform: scale(1.02); }
.header-logo-img { width: auto; height: 46px; max-width: 150px; object-fit: contain; display: block; }

.user-nav { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; padding: 4px 12px 4px 4px; border-radius: 30px; transition: background 0.2s ease; cursor: pointer; border: 1px solid transparent; }
.user-nav:hover { background: #f8fafc; border-color: #e2e8f0; }
.user-logo-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.user-name { font-size: 0.95rem; font-weight: 500; color: #475569; text-decoration: none; }
.user-name:hover { color: #1e293b; }

/* Modern Sidebar */
.sidebar { position: fixed; top: 64px; left: 0; bottom: 0; width: 250px; background: #ffffff; border-right: 1px solid #f1f5f9; box-shadow: 2px 0 12px rgba(0,0,0,0.015); padding: 0; z-index: 99; display: flex; flex-direction: column; transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden; }
.sidebar-top-divider { display: none; } /* Убираем жесткую линию */
.sidebar-nav { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 1.25rem 0.85rem; gap: 6px; }
.sidebar-divider { border: none; border-top: 1px solid #f1f5f9; margin: 0.75rem 0.5rem; flex-shrink: 0; }

.nav-link { padding: 0.65rem 1rem; color: #64748b; text-decoration: none; font-size: 0.95rem; font-weight: 500; display: flex; align-items: center; gap: 0.75rem; min-height: 44px; white-space: nowrap; border-radius: 12px; transition: all 0.2s ease; }
.nav-link:hover { background: #f8fafc; color: #1e293b; transform: translateX(4px); }
.nav-link.active { color: #2e7d32; font-weight: 600; background: #f0fdf4; box-shadow: inset 2px 0 0 #2e7d32; }

/* Выделенная кнопка создания (CTA) */
.nav-link-create { font-weight: 600; color: #ffffff !important; background: #2e7d32; margin-bottom: 0.5rem; box-shadow: 0 4px 10px -2px rgba(46, 125, 50, 0.25); border-radius: 12px; }
.nav-link-create:hover { background: #1b5e20; transform: translateY(-2px) !important; box-shadow: 0 6px 14px -2px rgba(46, 125, 50, 0.35); }
.nav-link-create.active { background: #154c18; box-shadow: inset 0 2px 4px rgba(0,0,0,0.15); }

.nav-link-icon { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; color: currentColor; transition: transform 0.25s ease; }
.nav-link:hover .nav-link-icon { transform: scale(1.15); }
.nav-link-text { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }

.sidebar-toggle { margin: 0; padding: 0; width: 40px; min-width: 40px; height: 40px; border: none; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; color: #94a3b8; transition: all 0.2s; flex-shrink: 0; border-radius: 8px; }
.sidebar-toggle:hover { color: #1e293b; background: #f1f5f9; }
.sidebar-toggle .sidebar-toggle-close { display: none; }
.sidebar-toggle .sidebar-toggle-open { display: inline; }

/* Collapsed state */
body.sidebar-collapsed .main-header { grid-template-columns: 80px 1fr; }
body.sidebar-collapsed .sidebar { width: 80px; padding-left: 0; padding-right: 0; }
body.sidebar-collapsed .sidebar-nav { padding: 1.25rem 0.5rem; }
body.sidebar-collapsed .sidebar .nav-link { justify-content: center; padding: 0.75rem; margin: 0 0.25rem; }
body.sidebar-collapsed .sidebar .nav-link:hover { transform: translateY(-2px); }
body.sidebar-collapsed .sidebar .nav-link-create:hover { transform: translateY(-3px) !important; }
body.sidebar-collapsed .sidebar .nav-link-text { display: none; }
body.sidebar-collapsed .sidebar-divider { display: none; }
body.sidebar-collapsed .main-content { margin-left: 80px; }

/* Main content wrapper */
.main-content { margin-left: 250px; margin-right: 0; margin-top: 64px; padding: 2rem; min-height: calc(100vh - 64px); transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1); border-left: none; background: #f8fafc; }

/* Layout without sidebar */
body.has-exercise-sidebar .main-content { margin-right: 320px; }
body.no-sidebar .main-content { margin-right: 0; }
#exercise-sidebar { transform: translateX(0); transition: transform 0.3s ease; }
body.no-sidebar #exercise-sidebar { transform: translateX(100%); pointer-events: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.95rem; cursor: pointer; border: none; text-decoration: none; text-align: center; min-height: 38px; }
.btn-primary { background: #2e7d32; color: #fff; }
.btn-primary:hover { background: #1b5e20; }
.btn-secondary { background: #e0e0e0; color: #333; }
.btn-secondary:hover { background: #d0d0d0; }
.btn-action-group { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-action { background: #e8e8e8; color: #444; border-radius: 6px; min-height: 38px; padding: 0.5rem 1rem; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; border: none; cursor: pointer; transition: background 0.2s; }
.btn-action:hover { background: #d8d8d8; color: #333; }
.btn-action .btn-icon { width: 18px; height: 18px; flex-shrink: 0; }
.btn-action .btn-icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary .btn-icon svg { stroke: currentColor; }
.btn-sm, .btn-small { padding: 0.35rem 0.75rem; font-size: 0.85rem; }
.btn-danger { background: #c62828; color: #fff; }
.btn-danger:hover { background: #b71c1c; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.35rem; font-weight: 500; font-size: 0.9rem; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #ccc; border-radius: 6px; font-size: 1rem; }
.form-group textarea { min-height: 80px; resize: vertical; }
.form-hint { display: block; font-size: 0.8rem; color: #666; margin-top: 0.25rem; }
.muscle-groups-manage .muscle-groups-list { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.muscle-groups-manage .muscle-groups-list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.35rem 0; border-bottom: 1px solid #eee; }
.muscle-groups-manage .muscle-groups-list li:last-child { border-bottom: none; }
.muscle-groups-manage .muscle-groups-list span { flex: 1; }

/* Exercise form (create/edit) — two columns, modern inputs, dropzone, muscle tags */
.exercise-form-wrap { max-width: 1000px; margin: 0 auto; }
.exercise-form-grid { display: grid; grid-template-columns: 1fr 300px; gap: 30px; }
@media (max-width: 768px) {
    .exercise-form-grid { grid-template-columns: 1fr; }
}
.exercise-form-grid input:not([type="file"]):not([type="checkbox"]), .exercise-form-grid select, .exercise-form-grid textarea { border-radius: 8px; border: 1px solid #d1d5db; padding: 10px 14px; width: 100%; font-family: inherit; transition: border-color 0.2s; }
.exercise-form-grid .description-editor { border-radius: 8px; border: 1px solid #d1d5db; padding: 10px 14px; min-height: 80px; font-family: inherit; transition: border-color 0.2s; }
.exercise-form-grid .description-editor:empty::before { content: attr(data-placeholder); color: #9ca3af; }
.exercise-form-grid .description-editor:focus { outline: none; border-color: #7c4dff; }
.exercise-form-grid input:focus, .exercise-form-grid select:focus { outline: none; border-color: #7c4dff; }
.exercise-form-grid .description-toolbar { margin-bottom: 6px; }
.exercise-form-grid .desc-btn { width: 32px; height: 28px; margin-right: 4px; border: 1px solid #d1d5db; background: #f9fafb; border-radius: 8px; cursor: pointer; font-weight: bold; font-size: 0.95rem; transition: border-color 0.2s; }
.exercise-form-grid .desc-btn:hover { background: #f3f4f6; border-color: #7c4dff; }
.custom-dropzone-input { display: none; }
.custom-dropzone { border: 2px dashed #d1d5db; border-radius: 12px; padding: 40px 20px; text-align: center; cursor: pointer; transition: 0.2s; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 250px; background: #f9fafb; position: relative; }
.custom-dropzone:hover { border-color: #7c4dff; background: #fff; }
.custom-dropzone .dropzone-content { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.custom-dropzone .dropzone-content svg { flex-shrink: 0; }
.custom-dropzone .dropzone-content span { font-size: 0.95rem; color: #374151; }
.custom-dropzone .dropzone-content small { font-size: 0.8rem; color: #9ca3af; }
.custom-dropzone img#imagePreview { display: none; max-width: 100%; border-radius: 8px; }
.custom-dropzone.has-preview .dropzone-content { display: none; }
.custom-dropzone.has-preview img#imagePreview { display: block !important; }

/* Стили для кнопки-крестика удаления изображения */
.btn-remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: #ffffff;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 20;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.btn-remove-image:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
    transform: scale(1.05);
}
.muscle-groups-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; list-style: none; padding: 0; margin-left: 0; margin-right: 0; margin-bottom: 0; }
.muscle-tag { display: inline-flex; align-items: center; gap: 6px; background: #f3f4f6; padding: 6px 12px; border-radius: 20px; font-size: 0.9rem; border: 1px solid #e5e7eb; }
.btn-edit-tag { color: #6b7280; background: transparent; border: none; padding: 0; cursor: pointer; display: flex; align-items: center; transition: color 0.2s; margin-left: 4px; }
.btn-edit-tag:hover { color: #7c4dff; }
.btn-delete-tag { color: #ef4444; background: transparent; border: none; padding: 0; cursor: pointer; font-size: 1.1rem; line-height: 1; display: flex; align-items: center; transition: color 0.2s; }
.btn-delete-tag:hover { color: #b91c1c; }
.muscle-groups-manage .muscle-groups-tags .muscle-tag { margin: 0; }

/* Autocomplete dropdown (exercise name) */
.autocomplete-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #d1d5db; border-radius: 6px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); margin: 5px 0 0; padding: 0; list-style: none; z-index: 1000; display: none; max-height: 200px; overflow-y: auto; }
.autocomplete-dropdown li { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #f3f4f6; color: #4b5563; font-size: 0.9rem; }
.autocomplete-dropdown li:last-child { border-bottom: none; }
.autocomplete-dropdown li:hover { background: #f9fafb; color: #7c4dff; }
.exercise-form-grid .input-error { border-color: #dc2626 !important; background-color: #fef2f2 !important; }

/* Cards and grid — block separation with lines */
.card { background: #fff; border-radius: 8px; border: 1px solid #e8e8e8; box-shadow: 0 1px 3px rgba(0,0,0,0.06); padding: 1.25rem; margin-bottom: 1rem; }
.card h2, .card h3 { margin: 0 0 0.75rem; font-size: 1.1rem; padding-bottom: 0.5rem; border-bottom: 1px solid #eee; }
.card-hint { color: #555; margin: 0 0 1rem; font-size: 0.95rem; }
.exercise-create-hint { margin: 0 0 0.75rem; font-size: 0.95rem; color: #555; }
.btn-create-card { font-size: 0.9rem; }
.actions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.action-card { background: #fff; border-radius: 8px; border: 1px solid #e8e8e8; box-shadow: 0 1px 3px rgba(0,0,0,0.06); padding: 1.5rem; text-align: center; text-decoration: none; color: inherit; display: flex; flex-direction: column; align-items: center; transition: box-shadow 0.2s, border-color 0.2s; }
.action-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); border-color: #ddd; }
.action-card-icon { width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; margin-bottom: 0.5rem; }
.action-card .icon { font-size: 2rem; margin-bottom: 0.5rem; }
.action-card .label { font-weight: 600; font-size: 0.95rem; }

/* Tables — block separation with lines */
.table-wrap { overflow-x: auto; margin-bottom: 1rem; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; border: 1px solid #e8e8e8; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid #eee; vertical-align: middle; }
/* Exercises table (view.php) */
.table-exercises th,
.table-exercises td { vertical-align: middle; }
.table-exercises tbody td { padding: 12px 15px; }
.table-exercises .table-col-num { width: 5%; text-align: center; }
.table-exercises .table-exercise-thumb { width: 70px; text-align: center; padding: 12px 15px; }
.table-exercises .exercise-thumb-img { max-height: 45px; width: auto; object-fit: contain; display: block; margin: 0 auto; border-radius: 4px; }
.table-exercises .exercise-thumb-placeholder { width: 45px; height: 45px; max-width: 45px; max-height: 45px; display: inline-flex; align-items: center; justify-content: center; background: #f0f0f0; border-radius: 4px; font-size: 1.25rem; color: #999; margin: 0 auto; }
.table-exercises .table-col-ejercicio { text-align: left; }
th { background: #f8f8f8; font-weight: 600; font-size: 0.85rem; border-bottom: 1px solid #ddd; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }
.table-actions { display: flex; gap: 0.5rem; justify-content: flex-end; }
table th:last-child { text-align: right; }
.th-actions { text-align: right; }
.td-actions { text-align: right; white-space: nowrap; }

/* Clients table: clear column divisions */
.table-clients th,
.table-clients td { border-right: 1px solid #e8e8e8; padding: 1.1rem 1.25rem; min-height: 2.75rem; }
.table-clients th:last-child,
.table-clients td:last-child { border-right: none; }
.table-clients thead th { background: #f0f0f0; color: #444; font-size: 0.9rem; padding: 1rem 1.25rem; }
.table-clients tbody tr { border-bottom: 1px solid #eee; }
.table-clients tbody tr:hover td { background: #fafafa; }
.table-clients tbody td { color: #333; vertical-align: middle; }
.table-clients th.th-actions,
.table-clients td.td-actions { text-align: left; }
.table-clients .table-actions { justify-content: flex-start; padding-right: 0; }

/* Page title */
.page-title { margin: 0 0 1rem; font-size: 1.5rem; }

/* Alerts */
.alert { padding: 0.75rem 1rem; border-radius: 10px; margin-bottom: 1rem; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid rgba(46, 125, 50, 0.2); }
.alert-error { background: #ffebee; color: #c62828; }

/* Empty state */
.empty-state { text-align: center; padding: 2rem; color: #666; }
.empty-state p { margin: 0 0 1rem; }

/* Training builder: exercise list */
.exercise-rows { margin-top: 1rem; }
.exercise-row { display: grid; grid-template-columns: 1fr auto auto auto auto auto; gap: 0.5rem; align-items: end; margin-bottom: 0.5rem; padding: 0.5rem; background: #f9f9f9; border-radius: 6px; }
.exercise-row label { font-size: 0.8rem; }
.exercise-row input, .exercise-row select { padding: 0.4rem; }
.exercise-row .col-name { min-width: 180px; }
.exercise-row .col-sets, .exercise-row .col-reps { width: 70px; }
.exercise-row .col-rest { width: 80px; }
.btn-remove-row { padding: 0.4rem 0.6rem; font-size: 0.85rem; }

/* Training grid 3x3 */
.training-grid-3x3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
/* Контейнер слота - убираем рамку и фон, оставляем только логику сетки */
.training-grid-slot {
    min-height: 200px;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    cursor: grab;
}
.training-grid-slot:active { cursor: grabbing; }
.sortable-ghost { opacity: 0.4; background-color: #f8fafc; border: 2px dashed #94a3b8 !important; border-radius: 8px; }
/* Скрываем пустые слоты, если контейнер получил класс hide-empty */
.training-grid-3x3.hide-empty .training-grid-slot.is-empty,
.training-grid.hide-empty .training-grid-slot.is-empty {
    display: none !important;
}
.slot-card-actions button { cursor: pointer; }
/* Пустой слот (с плюсиком) - переносим рамку сюда и делаем её красивее */
.training-grid-slot .slot-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    width: 100%;
    height: 100%;
    gap: 0.5rem;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: #f9fafb;
    transition: all 0.2s ease;
}
/* Эффект при наведении на пустой слот */
.training-grid-slot .slot-empty:hover {
    border-color: #2e7d32;
    background: #ffffff;
}
.training-grid-slot .slot-plus { font-size: 2.5rem; color: #999; line-height: 1; }
.training-grid-slot .slot-select { width: 100%; max-width: 100%; padding: 0.4rem; font-size: 0.85rem; }
/* Exercise card (screenshot 1 style): white card, shadow, rounded */
.training-grid-slot .slot-card { padding: 0; width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); border: 1px solid #eee; overflow: hidden; }
/* Зона изображения - убираем огромные отступы, чтобы дать картинке место */
.slot-card-image {
    padding: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-grow: 1 !important;
    background: #ffffff !important;
    min-height: 160px !important;
}

/* Сама картинка - увеличиваем максимальную высоту почти в 2 раза */
.slot-card-image img {
    max-height: 230px !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* Боковая панель упражнений: картинки покрупнее */
.sidebar-exercise-card .slot-card-image img {
    max-height: 140px !important;
}

/* Global confirmation modal for deletions */
.custom-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); display: none; align-items: center; justify-content: center; z-index: 99999; }
.custom-modal-box { background: #fff; width: 450px; max-width: 90%; border-radius: 12px; padding: 40px 30px 20px; text-align: center; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
.custom-modal-icon { color: #ef4444; width: 70px; height: 70px; margin: 0 auto 20px; }
.custom-modal-title-wrap { position: relative; margin-bottom: 25px; display: flex; align-items: center; justify-content: center; }
.custom-modal-title-wrap::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; border-top: 1px solid #fecdd3; z-index: 1; }
.custom-modal-title { color: #ef4444; font-size: 1.6rem; margin: 0; font-weight: 600; position: relative; z-index: 2; background: #fff; padding: 0 20px; }
.custom-modal-text { color: #4b5563; font-size: 1.05rem; margin-bottom: 40px; padding-bottom: 30px; border-bottom: 1px solid #f3f4f6; }
.custom-modal-actions { display: flex; justify-content: space-between; gap: 15px; }
.custom-btn-cancel, .custom-btn-confirm { flex: 1; border: none; padding: 12px 24px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 1rem; transition: opacity 0.2s, transform 0.1s; text-decoration: none; display: inline-block; }
.custom-btn-cancel { background: #ef4444; color: #fff; }
.custom-btn-confirm { background: #65a30d; color: #fff; }
.custom-btn-cancel:hover, .custom-btn-confirm:hover { opacity: 0.9; transform: translateY(-1px); }
.slot-card-no-image { color: #999; font-size: 0.8rem; padding: 0.5rem; }
.slot-card-name { font-weight: 600; font-size: 0.88rem; line-height: 1.25; color: #333; padding: 0.5rem 0.6rem 0.4rem; flex: 1; }
.slot-card-note { background: #f3f4f6; display: flex; flex-direction: column; }
.slot-note-content { display: flex; flex-direction: column; flex: 1 1 0%; justify-content: center; align-items: center; padding: 0.5rem 0.6rem; text-align: center; }
.slot-note-title { font-weight: 600; font-size: 0.9rem; color: #000; margin: 0 0 0.25rem; }
.slot-note-text { font-size: 0.8rem; color: #4b5563; line-height: 1.35; white-space: pre-wrap; word-break: break-word; }
.slot-note-text p { margin: 0 0 0.25rem; }
.slot-card-actions { display: flex; justify-content: center; align-items: center; gap: 0.5rem; padding: 0.5rem 0.6rem 0.6rem; }
.btn-edit-slot, .btn-remove-slot { width: 36px; height: 36px; border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; flex-shrink: 0; overflow: hidden; }
.btn-edit-slot { background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 0; color: transparent; }
.btn-edit-slot::before { content: ''; display: block; width: 20px; height: 20px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231975d2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'/%3E%3C/svg%3E") center/contain no-repeat; }
.btn-edit-slot:hover { background: #f5f5f5; border-color: #ccc; }
.btn-remove-slot { background: #c62828; color: #fff; border-radius: 50%; font-size: 0; line-height: 1; }
.btn-remove-slot::after { content: '×'; font-size: 1.25rem; font-weight: 300; color: #fff; }
.btn-remove-slot:hover { background: #b71c1c; }
.slot-card-fields { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.slot-card-fields label { font-size: 0.75rem; font-weight: normal; display: inline-flex; align-items: center; gap: 0.2rem; }
.slot-card-fields input { width: 3rem; padding: 0.2rem; font-size: 0.8rem; }
.slot-card textarea { font-size: 0.8rem; min-height: 2em; resize: vertical; }
.exercise-image-preview { margin-bottom: 0.5rem; }

/* Training main block (screenshot 1): one row Título + Nivel + Duración, second row Objetivo */
.training-main-block { margin-bottom: 1.25rem; }
.training-title-row { display: flex; flex-direction: row; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; flex-wrap: nowrap; }
.training-title-row .training-field-wrap { display: flex; flex-direction: column; gap: 0.35rem; }
.training-title-row .training-field-wrap:first-child { flex: 1; min-width: 0; }
.training-title-row .training-field-wrap:not(:first-child) { flex: 0 0 auto; width: 140px; }
.training-title-row label { display: block; font-weight: 500; font-size: 0.9rem; color: #333; margin: 0; }
.training-title-row input[type="text"],
.training-title-row select { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #d0d0d0; border-radius: 8px; font-size: 1rem; box-sizing: border-box; background: #fff; height: 2.5rem; }
.training-title-row select { cursor: pointer; appearance: auto; }
.training-objetivo-row { margin-bottom: 0; }
.training-objetivo-row label { display: block; font-weight: 500; font-size: 0.9rem; color: #333; margin-bottom: 0.35rem; }
.training-objetivo-row textarea { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #d0d0d0; border-radius: 8px; font-size: 1rem; resize: none; height: 2.5rem; min-height: 2.5rem; box-sizing: border-box; font-family: inherit; }
.training-main-block #title-count,
.training-main-block #obj-count { font-weight: normal; color: #666; font-size: 0.9em; }
@media (max-width: 640px) {
    .training-title-row { flex-wrap: wrap; }
    .training-title-row .training-field-wrap:not(:first-child) { width: 120px; }
}

/* Training top actions (Clientes / Guardar / Clonar / Ejercicios) */
.training-top-actions { display: flex; justify-content: flex-end; align-items: center; gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.training-client-select-wrap { position: relative; margin-right: auto; }
.btn-clientes-dropdown { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.9rem; font-size: 0.85rem; background: #fff; border: 2px solid #5c6bc0; color: #3949ab; border-radius: 9999px; cursor: pointer; }
.btn-clientes-dropdown:hover { background: #e8eaf6; }
.btn-clientes-value { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-clientes-arrow { font-size: 0.65rem; opacity: 0.8; }
.client-dropdown-panel { position: absolute; top: 100%; left: 0; margin-top: 0.25rem; background: #fff; border: 1px solid #ddd; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); min-width: 200px; max-height: 240px; overflow-y: auto; z-index: 100; display: none; }
.client-dropdown-panel.client-dropdown-open { display: block; }
.client-dropdown-item { display: block; width: 100%; padding: 0.5rem 1rem; text-align: left; border: none; background: none; cursor: pointer; font-size: 0.95rem; }
.client-dropdown-item:hover { background: #f0f0f0; }
.client-dropdown-empty { padding: 0.75rem 1rem; font-size: 0.9rem; color: #666; }
.client-dropdown-empty a { color: #3949ab; }
.btn-ejercicios-main { background: #7cb342; color: #fff; border: none; border-radius: 4px; padding: 0.5rem 1.5rem; font-weight: 600; font-size: 0.95rem; cursor: pointer; display: none; }
body.no-sidebar .btn-ejercicios-main { display: inline-block; }
.btn-ejercicios-main:hover { opacity: 0.9; }
/* Pill buttons (editor action pills) */
.editor-action-pills { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.pill-btn {
  background-color: #ffffff;
  border-radius: 50px;
  padding: 4px 14px;
  font-size: 0.85rem;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
  text-align: center;
}
.pill-green { border: 1px solid #65a30d; color: #65a30d; }
.pill-green:hover { background-color: #65a30d; color: #ffffff; }
.pill-black { border: 1px solid #1f2937; color: #1f2937; }
.pill-black:hover { background-color: #1f2937; color: #ffffff; }
.pill-red { border: 1px solid #dc2626; color: #dc2626; }
.pill-red:hover { background-color: #dc2626; color: #ffffff; }

/* Exercise edit modal (layout as screenshot 1) */
.exercise-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.exercise-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.exercise-modal-box { position: relative; background: #fff; border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); max-width: 720px; width: 100%; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; }
.exercise-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid #eee; }
.exercise-modal-title { margin: 0; font-size: 1.1rem; font-weight: 600; }
.exercise-modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #666; line-height: 1; padding: 0 0.25rem; }
.exercise-modal-close:hover { color: #333; }
.exercise-modal-body { padding: 1.25rem; overflow-y: auto; flex: 1; }
.exercise-modal-top-row { display: flex; gap: 1.25rem; margin-bottom: 0; }
.exercise-modal-image-card { flex-shrink: 0; background: #fff; border: 1px solid #e8e8e8; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.exercise-modal-image-card .slot-card-image { width: 180px; height: 160px; display: flex; align-items: center; justify-content: center; }
.exercise-modal-image-card .slot-card-image img { width: 100%; height: 100%; object-fit: contain; }
.exercise-modal-image-card .slot-card-no-image { color: #999; font-size: 0.85rem; padding: 1rem; }
.exercise-modal-right { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.exercise-modal-params { display: flex; flex-wrap: wrap; gap: 0 1rem; margin-bottom: 1rem; }
.exercise-modal-params .exercise-modal-field { margin-bottom: 0.75rem; margin-right: 0.5rem; }
.exercise-modal-field { margin-bottom: 0.75rem; }
.exercise-modal-field label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 0.25rem; color: #333; }
.exercise-modal-field input[type="number"], .exercise-modal-field select { padding: 0.45rem 0.5rem; border: 1px solid #d0d0d0; border-radius: 6px; font-size: 0.95rem; }
.exercise-modal-field input[type="number"] { width: 4rem; }
.exercise-modal-field select { min-width: 5.5rem; }
.exercise-modal-notes-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.exercise-modal-notes-wrap textarea { width: 100%; padding: 0.5rem; border: 1px solid #d0d0d0; border-radius: 6px; font-size: 0.9rem; resize: vertical; min-height: 100px; }
.exercise-modal-desc-section { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid #eee; }
.exercise-modal-desc-label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 0.35rem; color: #333; }
.exercise-modal-toolbar { margin-bottom: 0.5rem; }
.exercise-modal-btn-format { width: 28px; height: 28px; padding: 0; border: 1px solid #d0d0d0; border-radius: 4px; background: #fff; font-size: 0.9rem; font-weight: 700; cursor: pointer; margin-right: 0.25rem; }
.exercise-modal-btn-format:hover { background: #f5f5f5; }
.exercise-modal-description { white-space: pre-wrap; font-size: 0.9rem; color: #444; background: #f5f5f5; padding: 0.875rem 1rem; border-radius: 6px; max-height: 220px; overflow-y: auto; line-height: 1.5; border: 1px solid #e8e8e8; }
.exercise-modal-description-editable { min-height: 100px; }
.exercise-modal-description-editable:empty::before { content: attr(data-placeholder); color: #999; }
.exercise-modal-footer { padding: 1rem 1.25rem; border-top: 1px solid #eee; text-align: right; }

/* Note modal (#noteModal) */
#noteModal .exercise-modal-box { max-width: 500px; width: 100%; }
#noteModal .exercise-modal-body { display: flex; flex-direction: column; }
#noteModal .exercise-modal-body label { display: block; font-size: 0.9rem; font-weight: 500; color: #333; }
#noteModal #noteModalTextarea { border: 1px solid #d1d5db; border-radius: 8px; padding: 12px; width: 100%; margin-top: 8px; font-family: inherit; font-size: 1rem; resize: vertical; min-height: 120px; box-sizing: border-box; }
#noteModal #noteModalTextarea:focus { outline: none; border-color: #7c4dff; }
#noteModal #noteModalGuardar { background-color: #fff; border-radius: 50px; padding: 6px 18px; font-size: 0.9rem; font-weight: 500; border: 1px solid #65a30d; color: #65a30d; cursor: pointer; transition: all 0.2s ease; }
#noteModal #noteModalGuardar:hover { background-color: #65a30d; color: #fff; }

/* Exercise view modal (исправленный макет) */
.exercise-view-modal { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.exercise-view-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(2px); }
.exercise-view-modal-box { position: relative; background: #fff; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); width: 100%; max-width: 850px; max-height: 90vh; display: flex; flex-direction: column; }
.exercise-view-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 2rem; border-bottom: 1px solid #f3f4f6; }
.exercise-view-modal-title { margin: 0; font-size: 1.25rem; font-weight: 600; color: #1f2937; }
.exercise-view-modal-close { background: none; border: none; font-size: 1.75rem; cursor: pointer; color: #9ca3af; line-height: 1; padding: 0; transition: color 0.2s; }
.exercise-view-modal-close:hover { color: #111827; }
.exercise-view-modal-body { padding: 2rem; overflow-y: auto; flex: 1; }

/* Контейнер для верхних колонок (Картинки + Текст) */
.exercise-view-modal-columns { display: flex; gap: 2rem; align-items: flex-start; }

/* Левая колонка (Единая рамка для всех картинок) */
.exercise-view-modal-left {
    flex-shrink: 0;
    width: 235px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

/* Контейнер для каждой картинки внутри общей рамки */
.exercise-view-image-wrap {
    width: 100%;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

/* Тонкая линия-разделитель, если картинок две */
.exercise-view-image-wrap + .exercise-view-image-wrap {
    border-top: 1px solid #f3f4f6;
}

.exercise-view-image-wrap img {
    width: 100%;
    max-height: 240px;
    object-fit: contain;
}

.exercise-view-no-image {
    color: #9ca3af;
    font-size: 0.9rem;
    padding: 3rem 2rem;
    text-align: center;
}

/* Правая колонка (Текст) */
.exercise-view-modal-right { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.exercise-view-description { font-size: 0.95rem; color: #4b5563; line-height: 1.6; }
.exercise-view-description p { margin: 0 0 1rem; }
.exercise-view-description p:last-child { margin-bottom: 0; }
.exercise-view-description strong { font-weight: 700; color: #111827; }

/* Блок видео (Внизу под колонками, на всю ширину) */
.exercise-view-video-section { margin-top: 2rem; border-top: 1px solid #f3f4f6; padding-top: 2rem; }
.exercise-view-video-container { border-radius: 12px; overflow: hidden; position: relative; padding-bottom: 56.25%; height: 0; box-shadow: 0 4px 6px rgba(0,0,0,0.05); border: 1px solid #e5e7eb; width: 100%; max-width: 700px; margin: 0 auto; }
.exercise-view-video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

@media (max-width: 768px) {
    .exercise-view-modal-columns { flex-direction: column; }
    .exercise-view-modal-left { width: 100%; }
    .exercise-view-modal-body { padding: 1.25rem; }
    .exercise-view-video-section { margin-top: 1.5rem; padding-top: 1.5rem; }
}

/* Sidebar: panel Músculos (grupo muscular) */
#musculos-panel {
    min-width: 220px;
    border-radius: 10px;
    border: 1px solid #4b5563;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    background: #1f2937;
}
#musculos-panel .musculos-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #374151;
    background: #111827;
}
#musculos-panel .musculos-panel-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f3f4f6;
}
#musculos-panel .musculos-volver-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #e5e7eb;
    background: #374151;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
#musculos-panel .musculos-volver-btn:hover {
    background: #4b5563;
}
#musculos-panel .musculos-search-wrap {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #374151;
}
#musculos-panel #musculos-search {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #374151;
    color: #f3f4f6;
    border: 1px solid #4b5563;
}
#musculos-panel #musculos-search:focus {
    border-color: #9ca3af;
    box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.2);
}
#musculos-panel #musculos-search::placeholder {
    color: #9ca3af;
}
#musculos-panel #musculos-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 0.4rem 0;
}
#musculos-panel .musculos-option {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    text-align: left;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    color: #d1d5db;
}
#musculos-panel .musculos-option:hover {
    background: #374151;
    color: #ffffff;
}
#musculos-panel .musculos-option[data-muscle=""] {
    color: #ffffff;
    font-weight: 600;
}
#musculos-panel .musculos-option[data-muscle=""]:hover {
    background: #374151;
}
#musculos-panel .musculos-option.selected {
    background: #374151;
    color: #ffffff;
    font-weight: 500;
}

/* Settings / Profile page — premium card layout */
.settings-page-wrap { max-width: 1100px; margin: 0 auto; }
.settings-error { color: #c00; margin-bottom: 1rem; }
.settings-success { color: #2e7d32; margin-bottom: 1rem; }
.settings-form { width: 100%; }
.settings-layout { display: flex; align-items: flex-start; gap: 24px; }
.settings-main { flex: 1; min-width: 0; }
.settings-sidebar { width: 320px; flex-shrink: 0; display: flex; flex-direction: column; gap: 24px; }
.sidebar-card h4 { margin: 0 0 15px 0; font-size: 1.05rem; color: #1a1a1a; border-bottom: 1px solid #f0f0f0; padding-bottom: 10px; }
.sidebar-list { list-style: none; padding: 0; margin: 0; font-size: 0.85rem; color: #555; }
.sidebar-list-steps { list-style: none; padding-left: 0; counter-reset: sidebar-step; }
.sidebar-list-steps li { counter-increment: sidebar-step; margin-bottom: 10px; line-height: 1.4; padding-left: 1.5em; position: relative; }
.sidebar-list-steps li::before { content: counter(sidebar-step) "."; position: absolute; left: 0; font-weight: 600; color: #1a1a1a; }
.sidebar-list li { margin-bottom: 10px; line-height: 1.4; }
.sidebar-list strong { color: #1a1a1a; }
.sidebar-text { margin: 0; font-size: 0.85rem; color: #555; line-height: 1.5; }
@media (max-width: 900px) {
    .settings-layout { flex-direction: column; }
    .settings-sidebar { width: 100%; }
}
.settings-grid { display: flex; flex-direction: column; gap: 0; }
.settings-card { background: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); padding: 24px; margin-bottom: 24px; border: 1px solid #eee; }
.settings-card-title { margin: 0 0 20px; font-size: 1.15rem; font-weight: 600; color: #333; }
.settings-card-perfil { display: flex; gap: 40px; align-items: flex-start; flex-wrap: wrap; }
.settings-avatar-col { display: flex; flex-direction: column; align-items: center; text-align: center; width: 220px; flex-shrink: 0; }
.settings-avatar-wrap { margin-bottom: 15px; }
.settings-avatar-wrap #logoPreviewWrap { display: flex; align-items: center; justify-content: center; }
.settings-avatar-img { width: 150px; height: 150px; object-fit: contain; border: 1px solid #eee; border-radius: 8px; margin: 0 auto; display: block; }
.settings-avatar-placeholder { width: 150px; height: 150px; margin: 0 auto; display: flex; align-items: center; justify-content: center; background: #f5f5f5; border: 1px solid #eee; border-radius: 8px; color: #999; font-size: 0.9rem; }
.settings-file-input { display: none; }
.btn-upload-logo { display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; text-align: center; border: 1px dashed #ccc; background: #fafafa; padding: 8px 15px; border-radius: 6px; cursor: pointer; transition: all 0.2s; margin-top: 10px; font-size: 0.9rem; color: #555; }
.btn-upload-logo:hover { border-color: #7c4dff; background: rgba(124, 77, 255, 0.08); color: #7c4dff; }
.btn-upload-icon { font-size: 1rem; }
.settings-checkbox-label { display: block; font-size: 0.9rem; color: #555; cursor: pointer; margin-bottom: 8px; margin-top: 8px; }
.settings-checkbox { margin-right: 0.5rem; }
.settings-avatar-hint { display: block; margin-top: 10px; font-size: 0.75rem; color: #888; }
.settings-form-col { flex: 1; min-width: 280px; }
.settings-input { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 1rem; box-sizing: border-box; transition: border-color 0.2s; }
.settings-input:focus { outline: none; border-color: #7c4dff; box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.1); }
.settings-label { display: block; margin-bottom: 0.5rem; font-weight: 500; font-size: 0.9rem; }
.settings-smtp-radios { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.settings-smtp-radios input[type="radio"] { display: none; }
.settings-radio-label { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border: 1px solid #e5e7eb; border-radius: 8px; cursor: pointer; color: #4b5563; transition: all 0.2s ease; font-weight: 500; font-size: 0.95rem; }
.settings-radio-label:hover { border-color: #d1d5db; background: #fafafa; }
.settings-radio-label:has(input:checked) { border-color: #7c4dff; color: #7c4dff; background: rgba(124, 77, 255, 0.05); }
.settings-smtp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.settings-smtp-grid .form-group { margin-bottom: 0; }
.profile-smtp-fields { margin-top: 16px; }
.profile-smtp-fields .form-group { margin-bottom: 1rem; }
.profile-smtp-fields .settings-smtp-grid .form-group { margin-bottom: 1rem; }
.settings-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 1.5rem; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-2 label { display: block; margin-bottom: 0.35rem; font-weight: 500; font-size: 0.9rem; }
.form-row-2 input, .form-row-2 select { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #ccc; border-radius: 6px; font-size: 1rem; }

/* Utilities */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
