/* === Beratung Page Styles === */

/* Base Form Styles */
.form-control,
.form-select {
    width: 100%;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: white;
    color: #111827;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control::placeholder {
    color: #9ca3af;
}

.form-control-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
}

.beratung-page {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.beratung-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.header-title h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.header-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0.25rem 0 0 0;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary-action {
    background: #2563eb;
    color: white;
}

.btn-primary-action:hover:not(:disabled) {
    background: #1d4ed8;
}

.btn-secondary-action {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary-action:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* Selector Card */
.selector-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.selector-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    align-items: end;
}

.selector-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 0.375rem;
}

.selector-field .form-select {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.field-value {
    font-size: 0.875rem;
    color: #111827;
    padding: 0.5rem 0;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #6b7280;
    gap: 1rem;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    margin-right: 0.5rem;
}

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

/* Budget Card */
.budget-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.budget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.budget-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: #374151;
}

.budget-title i {
    color: #2563eb;
}

.budget-total {
    font-size: 0.875rem;
    font-weight: 600;
    color: #059669;
    background: #ecfdf5;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.budget-total.over-budget {
    color: #dc2626;
    background: #fef2f2;
}

.budget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
}

.budget-item {
    background: #f9fafb;
    border-radius: 6px;
    padding: 0.625rem 0.75rem;
}

.budget-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.375rem;
}

.topic-name {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.topic-count {
    font-size: 0.75rem;
    color: #111827;
    font-weight: 600;
}

.progress-track {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-fill.bg-success { background: #10b981; }
.progress-fill.bg-warning { background: #f59e0b; }
.progress-fill.bg-danger { background: #ef4444; }

.budget-empty {
    padding: 1.5rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Controls Bar */
.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.view-toggle, .status-filter {
    display: flex;
    background: #f3f4f6;
    border-radius: 6px;
    padding: 2px;
}

.view-toggle button, .status-filter button {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6b7280;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.view-toggle button.active, .status-filter button.active {
    background: white;
    color: #111827;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Sessions Table */
.sessions-table-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.sessions-table {
    width: 100%;
    border-collapse: collapse;
}

.sessions-table thead {
    background: #f9fafb;
}

.sessions-table th {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.sessions-table td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.session-row:hover {
    background: #f9fafb;
}

.col-date .date-main {
    display: block;
    font-weight: 500;
    color: #111827;
}

.col-date .date-weekday {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
}

.col-time {
    white-space: nowrap;
}

.ue-badge {
    display: inline-block;
    background: #f3f4f6;
    color: #374151;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.type-badge, .status-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.type-badge.praesenz {
    background: #ecfdf5;
    color: #059669;
}

.type-badge.online {
    background: #eff6ff;
    color: #2563eb;
}

.status-badge.scheduled {
    background: #eff6ff;
    color: #2563eb;
}

.status-badge.completed {
    background: #ecfdf5;
    color: #059669;
}

.status-badge.cancelled {
    background: #f3f4f6;
    color: #6b7280;
}

.col-content .content-text {
    display: block;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.col-content .content-empty {
    color: #d1d5db;
}

.col-actions {
    text-align: right;
}

.action-buttons {
    display: flex;
    gap: 0.25rem;
    justify-content: flex-end;
}

.action-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.875rem;
}

.action-btn.edit {
    background: #eff6ff;
    color: #2563eb;
}

.action-btn.edit:hover {
    background: #dbeafe;
}

.action-btn.complete {
    background: #ecfdf5;
    color: #059669;
}

.action-btn.complete:hover {
    background: #d1fae5;
}

.action-btn.delete {
    background: #fef2f2;
    color: #dc2626;
}

.action-btn.delete:hover {
    background: #fee2e2;
}

.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: #9ca3af;
}

.empty-state i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* Calendar Card */
.calendar-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.nav-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #374151;
}

.nav-btn:hover {
    background: #e5e7eb;
}

.current-month {
    font-weight: 600;
    color: #111827;
}

/* Slot Legend */
.slot-legend {
    display: flex;
    gap: 1.5rem;
    padding: 0.5rem 1rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.slot-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.slot-indicator {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.slot-indicator.morning {
    background: linear-gradient(135deg, #fef3c7 0%, #fcd34d 100%);
    border: 1px solid #f59e0b;
}

.slot-indicator.afternoon {
    background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
    border: 1px solid #3b82f6;
}

/* Slot-based Calendar Grid */
.calendar-grid-slots {
    display: flex;
    flex-direction: column;
}

/* Calendar Header with days */
.calendar-header-slots {
    display: grid;
    grid-template-columns: 50px repeat(7, 1fr);
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.calendar-cell-header {
    padding: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
}

.calendar-cell-header.time-label {
    background: #f3f4f6;
}

/* Week container */
.calendar-week-slots {
    border-bottom: 2px solid #e5e7eb;
}

.calendar-week-slots:last-child {
    border-bottom: none;
}

/* Calendar rows */
.calendar-row {
    display: grid;
    grid-template-columns: 50px repeat(7, 1fr);
}

/* Date row */
.date-row {
    border-bottom: 1px solid #f3f4f6;
}

.calendar-cell-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.375rem;
    background: #f9fafb;
    border-right: 1px solid #f3f4f6;
}

.calendar-cell-date:last-child {
    border-right: none;
}

.calendar-cell-date.other-month {
    background: #fafafa;
}

.calendar-cell-date.other-month .date-number,
.calendar-cell-date.other-month .date-month-short {
    color: #d1d5db;
}

.calendar-cell-date.today {
    background: #eff6ff;
}

.calendar-cell-date.today .date-number {
    background: #2563eb;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.date-number {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
}

.date-month-short {
    font-size: 0.625rem;
    color: #9ca3af;
    text-transform: uppercase;
}

/* Time cell */
.calendar-cell-time {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-right: 1px solid #e5e7eb;
}

.time-label-text {
    font-size: 0.625rem;
    font-weight: 600;
    color: #6b7280;
}

/* Slot rows - fixed height for consistent layout (52px + 30% = 68px) */
.slot-row {
    height: 68px;
}

.morning-row {
    background: linear-gradient(to right, rgba(254, 243, 199, 0.3), rgba(254, 243, 199, 0.1));
    border-bottom: 1px solid #f3f4f6;
}

.afternoon-row {
    background: linear-gradient(to right, rgba(219, 234, 254, 0.3), rgba(219, 234, 254, 0.1));
}

/* Slot cells */
.calendar-cell-slot {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0.25rem;
    padding-top: 2px;
    border-right: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.15s ease;
    overflow: hidden;
}

.calendar-cell-slot:last-child {
    border-right: none;
}

.calendar-cell-slot.other-month {
    background: rgba(250, 250, 250, 0.5);
    cursor: default;
}

.calendar-cell-slot.today {
    background: rgba(239, 246, 255, 0.5);
}

.calendar-cell-slot:not(.other-month):hover {
    background: rgba(229, 231, 235, 0.5);
}

/* Empty slot */
.slot-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 40px;
    color: #d1d5db;
    font-size: 1rem;
    border: 1px dashed #e5e7eb;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.calendar-cell-slot:not(.other-month):hover .slot-empty {
    color: #9ca3af;
    border-color: #9ca3af;
    background: rgba(255, 255, 255, 0.8);
}

/* Session in slot */
.slot-session {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.25rem;
    padding-left: 0.3rem;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Variable height based on UE (max 6 UE = 57px full height, +30%) */
.slot-session.ue-1 { height: 23px; }
.slot-session.ue-2 { height: 29px; }
.slot-session.ue-3 { height: 36px; }
.slot-session.ue-4 { height: 42px; }
.slot-session.ue-5 { height: 50px; }
.slot-session.ue-6 { height: 57px; }
.slot-session.ue-7, .slot-session.ue-8 { height: 60px; }

.slot-session:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.slot-session.scheduled {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid #93c5fd;
    color: #1e40af;
}

.slot-session.completed {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.slot-session.cancelled {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #6b7280;
    opacity: 0.7;
}

.slot-ue {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 0.5rem;
    font-weight: 700;
    background: rgba(0,0,0,0.15);
    padding: 1px 3px;
    border-radius: 2px;
    z-index: 1;
}

.slot-topic {
    font-size: 0.6rem;
    text-align: left;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.15;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    padding-top: 10px;
    padding-right: 12px;
}

.slot-type {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.5rem;
    font-weight: 700;
    padding: 1px 3px;
    border-radius: 2px;
}

.slot-type.praesenz {
    background: #ecfdf5;
    color: #059669;
}

.slot-type.online {
    background: #eff6ff;
    color: #2563eb;
}

/* Legacy calendar styles (kept for backwards compatibility) */
.calendar-grid {
    display: flex;
    flex-direction: column;
}

.calendar-header, .calendar-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-cell.header-cell {
    padding: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.calendar-day {
    min-height: 80px;
    padding: 0.375rem;
    border: 1px solid #f3f4f6;
    border-top: none;
    border-left: none;
}

.calendar-day:first-child {
    border-left: 1px solid #f3f4f6;
}

.calendar-day.other-month {
    background: #fafafa;
}

.calendar-day.other-month .day-number {
    color: #d1d5db;
}

.calendar-day.today {
    background: #eff6ff;
}

.calendar-day.today .day-number {
    background: #2563eb;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.day-number {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.day-sessions {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.session-chip {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.625rem;
    cursor: pointer;
    overflow: hidden;
}

.session-chip.scheduled {
    background: #dbeafe;
    color: #1e40af;
}

.session-chip.completed {
    background: #d1fae5;
    color: #065f46;
}

.session-chip.cancelled {
    background: #f3f4f6;
    color: #6b7280;
}

.chip-time {
    font-weight: 600;
}

.chip-topic {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Empty Placeholder */
.empty-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #9ca3af;
}

.empty-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-placeholder p {
    margin: 0;
    text-align: center;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

/* Modal Styles */
.modal-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-container.modal-sm { max-width: 400px; }
.modal-container.modal-lg { max-width: 640px; }
.modal-container.modal-xl { max-width: 900px; }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.15s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.span-1 { grid-column: span 1; }
.form-group.span-2 { grid-column: span 2; }
.form-group.span-3 { grid-column: span 3; }
.form-group.span-4 { grid-column: span 4; }
.form-group.span-5 { grid-column: span 5; }
.form-group.span-6 { grid-column: span 6; }

.form-group label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 0.375rem;
}

.form-group .form-control,
.form-group .form-select {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.form-group textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Toggle Group */
.toggle-group {
    display: flex;
    background: #f3f4f6;
    border-radius: 6px;
    padding: 2px;
}

.toggle-option {
    flex: 1;
    text-align: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6b7280;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.toggle-option input {
    display: none;
}

.toggle-option.active {
    background: white;
    color: #111827;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Weekday Selector */
.weekday-selector {
    display: flex;
    gap: 0.5rem;
}

.weekday-option {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.weekday-option input {
    display: none;
}

.weekday-option.active {
    background: #eff6ff;
    color: #2563eb;
    border-color: #93c5fd;
}

/* Topics Grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.topic-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.topic-checkbox:hover {
    background: #f3f4f6;
}

.topic-checkbox.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.topic-checkbox input {
    accent-color: #2563eb;
}

.topic-label {
    flex: 1;
    font-size: 0.875rem;
    color: #374151;
}

.topic-remaining {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Alert Warning */
.alert-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    color: #92400e;
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* Buttons */
.btn-cancel, .btn-secondary {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-cancel:hover, .btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-save {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
}

.btn-save:hover:not(:disabled) {
    background: #1d4ed8;
}

.btn-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-success {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: #059669;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-success:hover:not(:disabled) {
    background: #047857;
}

.btn-success:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-danger {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* Preview Styles */
.preview-summary {
    display: flex;
    gap: 1.5rem;
    padding: 1rem;
    background: #f0f9ff;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.summary-stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0369a1;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
}

.summary-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    color: #d97706;
    font-size: 0.875rem;
    font-weight: 500;
}

.preview-budget {
    margin-bottom: 1rem;
}

.preview-budget h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.5rem 0;
}

.budget-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.budget-preview-item {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.budget-preview-item .topic {
    color: #6b7280;
}

.budget-preview-item .usage {
    font-weight: 600;
    color: #374151;
}

.preview-table-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
}

.preview-table thead {
    position: sticky;
    top: 0;
    background: #f9fafb;
}

.preview-table th, .preview-table td {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.preview-table th {
    font-weight: 600;
    color: #6b7280;
}

.preview-table tr.conflict {
    background: #fffbeb;
}

.col-check {
    width: 40px;
}

/* Delete Modal */
.delete-message {
    color: #374151;
    margin: 0 0 1rem 0;
}

.delete-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #6b7280;
}

.delete-details strong {
    color: #111827;
}

/* Responsive */
@media (max-width: 768px) {
    .beratung-header {
        flex-direction: column;
        gap: 1rem;
    }

    .header-actions {
        width: 100%;
    }

    .selector-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.span-1,
    .form-group.span-2,
    .form-group.span-3,
    .form-group.span-4,
    .form-group.span-5,
    .form-group.span-6 {
        grid-column: span 1;
    }

    .topics-grid {
        grid-template-columns: 1fr;
    }
}
