/**
 * Portal CSS für Lizenzserver
 */

/* ============================================================================
   VARIABLEN
   ============================================================================ */

:root {
    --ls-primary: #2563eb;
    --ls-primary-dark: #1d4ed8;
    --ls-success: #10b981;
    --ls-warning: #f59e0b;
    --ls-error: #ef4444;
    --ls-gray-50: #f9fafb;
    --ls-gray-100: #f3f4f6;
    --ls-gray-200: #e5e7eb;
    --ls-gray-300: #d1d5db;
    --ls-gray-500: #6b7280;
    --ls-gray-700: #374151;
    --ls-gray-900: #1f2937;
}

/* ============================================================================
   ALLGEMEIN
   ============================================================================ */

.ls-portal-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    color: var(--ls-gray-900);
}

/* ============================================================================
   LOGIN
   ============================================================================ */

.ls-portal-login {
    max-width: 400px;
    margin: 60px auto;
    text-align: center;
}

.ls-portal-logo {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--ls-primary);
}

.ls-portal-login h1 {
    font-size: 20px;
    margin-bottom: 25px;
    color: var(--ls-gray-700);
}

/* ============================================================================
   KARTEN
   ============================================================================ */

.ls-portal-card {
    background: #fff;
    border: 1px solid var(--ls-gray-200);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
    box-sizing: border-box;
}

.ls-portal-card h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: var(--ls-gray-700);
}

.ls-portal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ls-portal-card-header h2 {
    margin: 0;
}

/* ============================================================================
   FORMULARE
   ============================================================================ */

.ls-portal-form {
    text-align: left;
}

.ls-portal-form-group {
    margin-bottom: 20px;
}

.ls-portal-form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--ls-gray-700);
}

.ls-portal-form-group input[type="text"],
.ls-portal-form-group input[type="email"],
.ls-portal-form-group input[type="password"],
.ls-portal-form-group input[type="tel"],
.ls-portal-form-group input[type="time"],
.ls-portal-form-group input[type="number"],
.ls-portal-form-group input[type="url"],
.ls-portal-form-group select,
.ls-portal-form-group textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--ls-gray-300);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ls-portal-form-group input:focus,
.ls-portal-form-group select:focus {
    border-color: var(--ls-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ls-portal-form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--ls-gray-500);
}

.ls-portal-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.ls-portal-checkbox input {
    width: 16px;
    height: 16px;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.ls-portal-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s, transform 0.1s;
}

.ls-portal-btn:hover {
    transform: translateY(-1px);
}

.ls-portal-btn-primary {
    background: var(--ls-primary);
    color: #fff;
}

/* Volle Breite nur in Login/Register-Formularen */
.ls-portal-login .ls-portal-btn-primary,
.ls-portal-register .ls-portal-btn-primary {
    width: 100%;
}

.ls-portal-btn-primary:hover {
    background: var(--ls-primary-dark);
    color: #fff;
}

.ls-portal-btn-secondary {
    background: var(--ls-gray-100);
    color: var(--ls-gray-700);
}

.ls-portal-btn-secondary:hover {
    background: var(--ls-gray-200);
}

.ls-portal-btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.ls-portal-btn-link {
    background: none;
    border: none;
    color: var(--ls-primary);
    cursor: pointer;
    font-size: inherit;
    padding: 0;
}

.ls-portal-btn-link:hover {
    text-decoration: underline;
}

/* ============================================================================
   ALERTS
   ============================================================================ */

.ls-portal-alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.ls-portal-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.ls-portal-alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.ls-portal-alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ============================================================================
   HEADER
   ============================================================================ */

.ls-portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--ls-gray-200);
}

.ls-portal-user {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.ls-portal-user code {
    background: var(--ls-gray-100);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.ls-portal-logout {
    color: var(--ls-gray-500);
    text-decoration: none;
}

.ls-portal-logout:hover {
    color: var(--ls-error);
}

/* ============================================================================
   WELCOME
   ============================================================================ */

.ls-portal-welcome h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
}

/* ============================================================================
   PLAN CARD
   ============================================================================ */

.ls-portal-plan-card {
    background: linear-gradient(135deg, var(--ls-primary), var(--ls-primary-dark));
    color: #fff;
    border: none;
}

.ls-portal-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.ls-portal-plan-label {
    font-size: 24px;
    font-weight: 700;
}

.ls-portal-plan-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    margin-left: 10px;
}

.ls-portal-status-active {
    background: rgba(255,255,255,0.2);
}

.ls-portal-status-expired {
    background: var(--ls-error);
}

.ls-portal-plan-expires {
    font-size: 14px;
    opacity: 0.9;
}

.ls-portal-warning {
    color: #fef3c7;
}

.ls-portal-error {
    color: #fecaca;
}

.ls-portal-plan-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.ls-portal-feature {
    background: rgba(255,255,255,0.15);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
}

.ls-portal-plan-actions {
    text-align: right;
}

.ls-portal-plan-card .ls-portal-btn-secondary {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.ls-portal-plan-card .ls-portal-btn-secondary:hover {
    background: rgba(255,255,255,0.3);
}

/* ============================================================================
   GRID
   ============================================================================ */

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

/* ============================================================================
   STATISTIKEN
   ============================================================================ */

.ls-portal-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.ls-portal-stat {
    text-align: center;
}

.ls-portal-stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--ls-primary);
}

.ls-portal-stat-label {
    font-size: 13px;
    color: var(--ls-gray-500);
}

.ls-portal-stat-breakdown {
    border-top: 1px solid var(--ls-gray-200);
    padding-top: 15px;
}

.ls-portal-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--ls-gray-100);
}

.ls-portal-stat-row:last-child {
    border-bottom: none;
}

/* ============================================================================
   STANDORTE
   ============================================================================ */

.ls-portal-locations {
    display: grid;
    gap: 15px;
}

.ls-portal-location {
    background: var(--ls-gray-50);
    border: 1px solid var(--ls-gray-200);
    border-radius: 8px;
    padding: 15px;
}

.ls-portal-location-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.ls-portal-location-header strong {
    font-size: 15px;
}

.ls-portal-location-header code {
    background: var(--ls-gray-200);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.ls-portal-primary-badge {
    color: var(--ls-warning);
}

.ls-portal-location-address {
    font-size: 13px;
    color: var(--ls-gray-500);
    margin-bottom: 10px;
}

.ls-portal-location-api-key {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.ls-portal-location-api-key code {
    background: var(--ls-gray-900);
    color: var(--ls-success);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.ls-portal-location-count {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--ls-gray-200);
    font-size: 13px;
    color: var(--ls-gray-500);
}

/* ============================================================================
   UPGRADE NOTICE
   ============================================================================ */

.ls-portal-upgrade-notice {
    background: var(--ls-gray-50);
    border: 1px dashed var(--ls-gray-300);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.ls-portal-upgrade-notice p {
    margin: 0 0 15px 0;
    color: var(--ls-gray-500);
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.ls-portal-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--ls-gray-200);
    text-align: center;
    font-size: 14px;
    color: var(--ls-gray-500);
}

.ls-portal-footer a {
    color: var(--ls-primary);
    text-decoration: none;
    font-weight: 500;
}

.ls-portal-footer-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--ls-gray-200);
    text-align: center;
    font-size: 13px;
    color: var(--ls-gray-500);
}

.ls-portal-footer-section code {
    background: var(--ls-gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.ls-portal-empty {
    text-align: center;
    color: var(--ls-gray-500);
    padding: 30px;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
    .ls-portal-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .ls-portal-plan-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .ls-portal-grid {
        grid-template-columns: 1fr;
    }
    
    .ls-portal-stats {
        flex-direction: column;
        gap: 15px;
    }
}

/* ============================================================================
   TAB-BASIERTES LAYOUT (v1.3.7)
   ============================================================================ */

.ls-portal-with-tabs .ls-portal-main {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 30px;
    margin-top: 30px;
}

/* Sidebar Navigation */
.ls-portal-sidebar {
    background: #fff;
    border: 1px solid var(--ls-gray-200);
    border-radius: 12px;
    padding: 20px 0;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.ls-portal-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ls-portal-nav-item {
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.ls-portal-nav-item.is-active {
    background: var(--ls-gray-50);
    border-left-color: var(--ls-primary);
}

.ls-portal-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--ls-gray-700);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.ls-portal-nav-link:hover {
    background: var(--ls-gray-50);
    color: var(--ls-primary);
}

.ls-portal-nav-item.is-active .ls-portal-nav-link {
    color: var(--ls-primary);
}

.ls-portal-nav-icon {
    font-size: 18px;
}

/* Sidebar Info */
.ls-portal-sidebar-info {
    margin-top: 20px;
    padding: 15px 20px;
    border-top: 1px solid var(--ls-gray-200);
}

.ls-portal-plan-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.ls-portal-plan-free { background: var(--ls-gray-100); color: var(--ls-gray-700); }
.ls-portal-plan-premium { background: #dbeafe; color: #1d4ed8; }
.ls-portal-plan-premium_plus { background: #fef3c7; color: #92400e; }

.ls-portal-expires {
    font-size: 12px;
    color: var(--ls-gray-500);
    margin-top: 8px;
}

/* Content Area */
.ls-portal-content {
    min-height: 400px;
}

/* Tab Headers */
.ls-portal-tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.ls-portal-tab-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

/* Quick Stats */
.ls-portal-quick-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.ls-portal-stat-card {
    background: #fff;
    border: 1px solid var(--ls-gray-200);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.ls-portal-stat-icon {
    font-size: 32px;
}

.ls-portal-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--ls-gray-900);
}

.ls-portal-stat-label {
    font-size: 13px;
    color: var(--ls-gray-500);
}

/* Quick Actions */
.ls-portal-quick-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.ls-portal-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 30px;
    background: var(--ls-gray-50);
    border: 1px solid var(--ls-gray-200);
    border-radius: 10px;
    text-decoration: none;
    color: var(--ls-gray-700);
    transition: all 0.2s ease;
}

.ls-portal-action-btn:hover {
    background: var(--ls-primary);
    border-color: var(--ls-primary);
    color: #fff;
}

.ls-portal-action-icon {
    font-size: 28px;
}

.ls-portal-action-label {
    font-size: 13px;
    font-weight: 500;
}

/* Locations Mini (Dashboard) */
.ls-portal-locations-mini {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ls-portal-location-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--ls-gray-50);
    border-radius: 8px;
    font-size: 14px;
}

.ls-portal-location-mini code {
    font-size: 11px;
    background: var(--ls-gray-200);
    padding: 2px 6px;
    border-radius: 4px;
}

.ls-portal-location-more {
    text-align: center;
    font-size: 13px;
    color: var(--ls-gray-500);
    padding: 10px;
}

/* Sync Status */
.ls-portal-sync-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--ls-gray-50);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.ls-portal-sync-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ls-portal-sync-warning {
    color: var(--ls-warning);
    font-weight: 500;
}

.ls-portal-sync-badge {
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ls-portal-sync-badge.ls-portal-synced {
    color: var(--ls-success);
}

.ls-portal-sync-badge.ls-portal-unsynced {
    color: var(--ls-gray-500);
}

/* Location Limit */
.ls-portal-location-limit {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--ls-gray-500);
}

.ls-portal-upgrade-link {
    color: var(--ls-primary);
    text-decoration: none;
    font-weight: 500;
}

/* Location Grid */
.ls-portal-locations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.ls-portal-location-card {
    background: #fff;
    border: 1px solid var(--ls-gray-200);
    border-radius: 12px;
    overflow: hidden;
}

.ls-portal-location-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--ls-gray-100);
    background: var(--ls-gray-50);
}

.ls-portal-location-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ls-portal-location-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.ls-portal-location-ids {
    display: flex;
    gap: 8px;
    margin-top: 5px;
}

.ls-portal-location-ids code {
    font-size: 11px;
    background: #fff;
    padding: 2px 6px;
    border-radius: 4px;
}

.ls-portal-pp-id {
    font-size: 10px;
    color: var(--ls-gray-500);
}

.ls-portal-location-body {
    padding: 15px 20px;
}

.ls-portal-location-field {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 13px;
}

.ls-portal-field-icon {
    width: 20px;
    text-align: center;
}

.ls-portal-location-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--ls-gray-50);
    border-top: 1px solid var(--ls-gray-100);
}

/* Empty State */
.ls-portal-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--ls-gray-50);
    border-radius: 12px;
}

.ls-portal-empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.ls-portal-empty-state h3 {
    margin: 0 0 10px;
    color: var(--ls-gray-700);
}

.ls-portal-empty-state p {
    color: var(--ls-gray-500);
    margin: 0;
}

/* Tables */
.ls-portal-table-wrapper {
    overflow-x: auto;
}

.ls-portal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ls-portal-table th,
.ls-portal-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--ls-gray-200);
}

.ls-portal-table th {
    background: var(--ls-gray-50);
    font-weight: 600;
    color: var(--ls-gray-700);
}

.ls-portal-table tr:hover {
    background: var(--ls-gray-50);
}

/* Badges */
.ls-portal-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.ls-portal-badge-success { background: #d1fae5; color: #065f46; }
.ls-portal-badge-warning { background: #fef3c7; color: #92400e; }
.ls-portal-badge-danger { background: #fee2e2; color: #991b1b; }
.ls-portal-badge-info { background: #dbeafe; color: #1e40af; }
.ls-portal-badge-secondary { background: var(--ls-gray-100); color: var(--ls-gray-700); }

.ls-portal-inactive-badge {
    background: var(--ls-gray-200);
    color: var(--ls-gray-600);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Subscription Card */
.ls-portal-subscription-card {
    background: #fff;
    border: 2px solid var(--ls-gray-200);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 25px;
}

.ls-portal-subscription-card.ls-portal-plan-premium {
    border-color: #3b82f6;
}

.ls-portal-subscription-card.ls-portal-plan-premium_plus {
    border-color: #f59e0b;
}

.ls-portal-subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    background: var(--ls-gray-50);
}

.ls-portal-subscription-plan {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ls-portal-plan-icon {
    font-size: 36px;
}

.ls-portal-subscription-plan h2 {
    margin: 0 0 5px;
    font-size: 20px;
}

.ls-portal-subscription-price {
    text-align: right;
}

.ls-portal-price-amount {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--ls-gray-900);
}

.ls-portal-price-period {
    font-size: 13px;
    color: var(--ls-gray-500);
}

.ls-portal-subscription-details {
    padding: 25px;
}

.ls-portal-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--ls-gray-100);
}

.ls-portal-detail-label {
    color: var(--ls-gray-500);
}

.ls-portal-detail-value code {
    font-size: 12px;
    background: var(--ls-gray-100);
    padding: 2px 6px;
    border-radius: 4px;
}

.ls-portal-subscription-features {
    padding: 0 25px 25px;
}

.ls-portal-subscription-features h4 {
    margin: 0 0 15px;
    font-size: 14px;
    color: var(--ls-gray-700);
}

.ls-portal-feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.ls-portal-feature-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.ls-portal-feature-check {
    color: var(--ls-success);
    font-weight: bold;
}

/* Upgrade Options */
.ls-portal-upgrade-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.ls-portal-plan-option {
    background: var(--ls-gray-50);
    border: 1px solid var(--ls-gray-200);
    border-radius: 12px;
    padding: 20px;
}

.ls-portal-plan-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.ls-portal-plan-option h3 {
    margin: 0;
    font-size: 18px;
}

.ls-portal-plan-price {
    font-weight: 600;
    color: var(--ls-primary);
}

.ls-portal-plan-features-mini {
    list-style: none;
    margin: 0 0 15px;
    padding: 0;
    font-size: 13px;
}

.ls-portal-plan-features-mini li {
    padding: 5px 0;
}

/* Info Boxes */
.ls-portal-info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 15px 20px;
    font-size: 14px;
    margin-top: 20px;
}

.ls-portal-info-box p {
    margin: 0;
}

/* Settings Tab */
.ls-portal-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Grid-Items dürfen nicht über den Container hinauslaufen */
.ls-portal-form-row > * {
    min-width: 0;
}

.ls-portal-form-small {
    max-width: 120px;
}

.ls-portal-form-hint {
    font-size: 12px;
    color: var(--ls-gray-500);
    margin-top: 5px;
}

.ls-portal-form-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--ls-gray-200);
}

.ls-portal-save-status {
    font-size: 14px;
}

.ls-portal-save-success {
    color: var(--ls-success);
}

.ls-portal-save-error {
    color: var(--ls-error);
}

.ls-portal-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.ls-portal-checkbox input {
    width: 18px;
    height: 18px;
}

.ls-portal-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.ls-portal-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ls-portal-info-label {
    font-size: 12px;
    color: var(--ls-gray-500);
    text-transform: uppercase;
}

.ls-portal-info-value {
    font-size: 14px;
}

.ls-portal-button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Modal */
.ls-portal-modal {
    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: 10000;
}

.ls-portal-modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.ls-portal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--ls-gray-200);
}

.ls-portal-modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.ls-portal-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--ls-gray-500);
}

.ls-portal-modal-content .ls-portal-form {
    padding: 25px;
}

.ls-portal-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--ls-gray-200);
}

/* Upgrade Notice */
.ls-portal-upgrade-notice {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 25px;
    border-radius: 12px;
}

.ls-portal-notice-icon {
    font-size: 48px;
}

.ls-portal-notice-content h3 {
    margin: 0 0 10px;
}

.ls-portal-notice-content p {
    margin: 0 0 15px;
    opacity: 0.9;
}

.ls-portal-upgrade-notice .ls-portal-btn-primary {
    background: #fff;
    color: #667eea;
}

/* Card Highlight */
.ls-portal-card-highlight {
    border-color: var(--ls-primary);
    border-width: 2px;
}

/* Flash Messages */
.ls-portal-flash {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.ls-portal-flash-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.ls-portal-flash-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.ls-portal-flash-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

/* Responsive für Tabs */
@media (max-width: 992px) {
    .ls-portal-with-tabs .ls-portal-main {
        grid-template-columns: 1fr;
    }
    
    .ls-portal-sidebar {
        position: static;
    }
    
    .ls-portal-nav {
        display: flex;
        overflow-x: auto;
        padding: 0 10px;
    }
    
    .ls-portal-nav-item {
        border-left: none;
        border-bottom: 3px solid transparent;
        flex-shrink: 0;
    }
    
    .ls-portal-nav-item.is-active {
        border-bottom-color: var(--ls-primary);
        background: none;
    }
    
    .ls-portal-sidebar-info {
        display: none;
    }
    
    .ls-portal-quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ls-portal-locations-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .ls-portal-quick-stats {
        grid-template-columns: 1fr;
    }
    
    .ls-portal-form-row {
        grid-template-columns: 1fr;
    }
    
    .ls-portal-subscription-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .ls-portal-subscription-price {
        text-align: center;
    }
    
    .ls-portal-feature-list {
        grid-template-columns: 1fr;
    }
    
    .ls-portal-info-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   TK — Terminkalender Portal Styles
   ============================================================================ */

/* Teaser */
.tk-teaser-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 25px 0;
}

.tk-teaser-feature {
    padding: 15px;
    background: var(--ls-bg-light, #f9fafb);
    border-radius: 8px;
}

.tk-teaser-feature strong {
    display: block;
    margin-bottom: 5px;
}

.tk-teaser-feature p {
    margin: 0;
    font-size: 14px;
    color: var(--ls-text-secondary, #6b7280);
}

/* Section Headers */
.tk-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tk-section-header h4 {
    margin: 0;
    font-size: 15px;
}

/* Buttons in Flex-Headern nicht strecken */
.tk-section-header .ls-portal-btn,
.ls-portal-tab-header .ls-portal-btn {
    white-space: nowrap;
    flex-shrink: 0;
    width: auto;
}

/* Location Card */
.tk-location-card {
    border-left: 3px solid var(--ls-primary, #2563eb);
}

.tk-location-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.tk-location-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tk-location-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 13px;
    color: var(--ls-text-secondary, #6b7280);
    margin-bottom: 15px;
}

.tk-location-info code {
    font-size: 12px;
    background: var(--ls-bg-light, #f3f4f6);
    padding: 1px 6px;
    border-radius: 4px;
}

/* Edit Forms */
.tk-edit-form {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--ls-border, #e5e7eb);
    overflow: hidden;
    box-sizing: border-box;
}

/* Doctors */
.tk-doctors-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--ls-border, #e5e7eb);
}

.tk-doctors-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tk-doctor-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 15px;
    background: var(--ls-bg-light, #f9fafb);
    border-radius: 8px;
    border: 1px solid var(--ls-border, #e5e7eb);
}

.tk-doctor-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tk-doctor-info code {
    font-size: 11px;
    background: #e5e7eb;
    padding: 1px 5px;
    border-radius: 3px;
}

.tk-doctor-actions {
    display: flex;
    gap: 8px;
}

/* Muted text */
.tk-muted {
    color: var(--ls-text-secondary, #6b7280);
    font-size: 13px;
}

/* Schedules */
.tk-schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tk-schedule-day {
    padding: 12px 15px;
    border: 1px solid var(--ls-border, #e5e7eb);
    border-radius: 8px;
    background: var(--ls-bg-light, #f9fafb);
}

.tk-schedule-day.tk-schedule-active {
    border-color: var(--ls-primary, #2563eb);
    background: #eff6ff;
}

.tk-schedule-day-name {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.tk-schedule-fields .ls-portal-form-row {
    margin-bottom: 8px;
    grid-template-columns: repeat(2, minmax(100px, 200px));
}

.tk-schedule-fields .ls-portal-form-group label {
    font-size: 12px;
}

/* Visit Types List */
.tk-visit-types-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tk-visit-type-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--ls-bg-light, #f9fafb);
    border-radius: 6px;
}

.tk-vt-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Custom Fields List */
.tk-custom-fields-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tk-custom-field-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: var(--ls-bg-light, #f9fafb);
    border-radius: 6px;
    border: 1px solid var(--ls-border, #e5e7eb);
}

.tk-cf-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tk-cf-order {
    font-weight: 600;
    color: var(--ls-text-secondary, #6b7280);
    min-width: 20px;
}

/* Insurance Stats */
.tk-insurance-stats {
    display: flex;
    gap: 15px;
}

.tk-insurance-stat {
    flex: 1;
    padding: 15px;
    background: var(--ls-bg-light, #f9fafb);
    border-radius: 8px;
    text-align: center;
}

.tk-insurance-stat strong {
    display: block;
    margin-bottom: 5px;
}

/* TK Plan Badge */
.ls-portal-plan-tk {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
}

/* Filter Forms */
.tk-filter-form {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    flex-wrap: wrap;
}

/* Cancelled rows */
.tk-row-cancelled {
    opacity: 0.5;
}

/* ============================================================================
   TK — Sub-Tab Navigation (terminkalender.php)
   ============================================================================ */

.tk-subtab-nav {
    margin-bottom: 25px;
    border-bottom: 2px solid var(--ls-gray-200);
}

.tk-subtab-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.tk-subtab-item {
    flex-shrink: 0;
}

.tk-subtab-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    color: var(--ls-gray-500);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.tk-subtab-link:hover {
    color: var(--ls-primary);
    text-decoration: none;
}

.tk-subtab-item.is-active .tk-subtab-link {
    color: var(--ls-primary);
    border-bottom-color: var(--ls-primary);
}

.tk-subtab-icon {
    font-size: 15px;
}

/* Preview iframe */
.tk-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.tk-preview-header h3 {
    margin: 0;
}

.tk-preview-select {
    padding: 8px 12px;
    border: 1px solid var(--ls-gray-300);
    border-radius: 8px;
    font-size: 14px;
    min-width: 200px;
}

.tk-preview-iframe-wrapper {
    display: flex;
    justify-content: center;
}

.tk-preview-iframe-wrapper iframe {
    border: 1px solid var(--ls-gray-200);
    border-radius: 8px;
    max-width: 600px;
}

/* Quick links grid */
.tk-quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.tk-quick-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: var(--ls-gray-50);
    border: 1px solid var(--ls-gray-200);
    border-radius: 8px;
    color: var(--ls-gray-700);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.tk-quick-link:hover {
    background: #eff6ff;
    border-color: var(--ls-primary);
    color: var(--ls-primary);
    text-decoration: none;
}

/* ============================================================================
   TK Kalender-Ansicht
   ============================================================================ */

/* --- Segment Control (iOS-Stil) --- */
.tk-segment-control {
    display: inline-flex;
    background: var(--ls-gray-100);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.tk-segment-btn {
    display: inline-block;
    padding: 7px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ls-gray-700);
    text-decoration: none;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    box-sizing: border-box;
    min-width: 0;
}

.tk-segment-btn:hover {
    color: var(--ls-primary);
    text-decoration: none;
}

.tk-segment-active {
    background: #fff;
    color: var(--ls-primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* --- Kalender-Navigation --- */
.tk-cal-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tk-cal-nav-btn {
    padding: 6px 14px !important;
    font-size: 14px !important;
    min-width: 0;
}

.tk-cal-nav-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--ls-gray-900);
    margin-left: 8px;
}

/* --- Layout (Mini-Kalender + Kalender-Grid) --- */
.tk-cal-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    overflow: hidden;
}

/* --- Mini-Kalender --- */
.tk-mini-cal {
    width: 220px;
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--ls-gray-200);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.tk-mini-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.tk-mini-cal-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ls-gray-900);
}

.tk-mini-cal-arrow {
    font-size: 14px;
    color: var(--ls-gray-500);
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s;
}

.tk-mini-cal-arrow:hover {
    background: var(--ls-gray-100);
    text-decoration: none;
}

.tk-mini-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    text-align: center;
}

.tk-mini-cal-dow {
    font-size: 11px;
    font-weight: 600;
    color: var(--ls-gray-500);
    padding: 4px 0;
}

.tk-mini-cal-day {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin: 1px auto;
    font-size: 12px;
    color: var(--ls-gray-700);
    border-radius: 50%;
    text-decoration: none;
    transition: background 0.15s;
    box-sizing: border-box;
    min-width: 0;
}

.tk-mini-cal-day:hover {
    background: var(--ls-gray-100);
    text-decoration: none;
}

.tk-mini-cal-empty {
    visibility: hidden;
}

.tk-mini-cal-today {
    background: var(--ls-primary);
    color: #fff !important;
    font-weight: 700;
}

.tk-mini-cal-today:hover {
    background: var(--ls-primary-dark);
}

.tk-mini-cal-selected {
    outline: 2px solid var(--ls-primary);
    outline-offset: -2px;
}

.tk-mini-cal-in-week {
    background: rgba(37, 99, 235, 0.08);
}

.tk-mini-cal-has-events::after {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    background: var(--ls-primary);
    border-radius: 50%;
    position: absolute;
    bottom: 1px;
    left: 50%;
    transform: translateX(-50%);
}

.tk-mini-cal-day {
    position: relative;
}

/* --- Kalender-Container --- */
.tk-cal-container {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    background: #fff;
    border: 1px solid var(--ls-gray-200);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

/* --- Kalender-Grid (Woche) --- */
.tk-cal-grid {
    display: grid;
    min-width: 600px;
}

.tk-cal-week {
    grid-template-columns: 50px repeat(7, 1fr);
}

/* --- Ecke oben links --- */
.tk-cal-corner {
    background: var(--ls-gray-50);
    border-bottom: 1px solid var(--ls-gray-200);
    border-right: 1px solid var(--ls-gray-200);
    min-width: 0;
    box-sizing: border-box;
}

/* --- Tag-Header --- */
.tk-cal-day-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    background: var(--ls-gray-50);
    border-bottom: 1px solid var(--ls-gray-200);
    border-right: 1px solid var(--ls-gray-200);
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.tk-cal-day-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--ls-gray-500);
    text-transform: uppercase;
}

.tk-cal-day-num {
    font-size: 18px;
    font-weight: 700;
    color: var(--ls-gray-900);
    line-height: 1.2;
}

.tk-cal-today-header {
    background: rgba(37, 99, 235, 0.06);
}

.tk-cal-today-header .tk-cal-day-num {
    color: var(--ls-primary);
}

.tk-cal-doc-specialty {
    font-size: 10px;
    color: var(--ls-gray-500);
    margin-top: 2px;
}

/* --- Zeitachse --- */
.tk-cal-time-col {
    border-right: 1px solid var(--ls-gray-200);
    background: var(--ls-gray-50);
    min-width: 0;
    box-sizing: border-box;
}

.tk-cal-time-label {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 2px 6px 0 0;
    font-size: 11px;
    color: var(--ls-gray-500);
    box-sizing: border-box;
    min-width: 0;
}

/* --- Tagesspalte --- */
.tk-cal-day-col {
    position: relative;
    border-right: 1px solid var(--ls-gray-200);
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

.tk-cal-day-col:last-child {
    border-right: none;
}

.tk-cal-today-col {
    background: rgba(37, 99, 235, 0.02);
}

/* --- Stundenlinien --- */
.tk-cal-hour-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    border-top: 1px solid var(--ls-gray-100);
    pointer-events: none;
    box-sizing: border-box;
}

/* --- Event-Block --- */
.tk-cal-event {
    position: absolute;
    left: 2px;
    right: 2px;
    border-radius: 6px;
    padding: 3px 6px;
    cursor: pointer;
    overflow: hidden;
    z-index: 2;
    transition: box-shadow 0.15s, transform 0.1s;
    box-sizing: border-box;
    min-width: 0;
    min-height: 24px;
    border-left: 3px solid rgba(0, 0, 0, 0.15);
}

.tk-cal-event:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    z-index: 3;
}

.tk-cal-event-cancelled {
    opacity: 0.5;
    text-decoration: line-through;
}

.tk-cal-event-time {
    font-size: 10px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.6);
    display: block;
    line-height: 1.2;
}

.tk-cal-event-title {
    font-size: 11px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.8);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.tk-cal-event-doctor {
    font-size: 10px;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.5);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* --- Rote Linie (aktuelle Uhrzeit) --- */
.tk-cal-now-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--ls-error);
    z-index: 5;
    pointer-events: none;
    box-sizing: border-box;
}

.tk-cal-now-line::before {
    content: '';
    position: absolute;
    left: -4px;
    top: -3px;
    width: 8px;
    height: 8px;
    background: var(--ls-error);
    border-radius: 50%;
}

/* --- Detail-Popup (iOS Action Sheet) --- */
.tk-event-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.tk-event-popup {
    background: #fff;
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
    animation: tk-popup-slide-up 0.3s ease-out;
    box-sizing: border-box;
}

.tk-popup-enter {
    animation: tk-popup-slide-up 0.3s ease-out;
}

@keyframes tk-popup-slide-up {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tk-event-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 12px;
    border-bottom: 1px solid var(--ls-gray-200);
}

.tk-event-popup-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--ls-gray-900);
}

.tk-event-popup-close {
    background: var(--ls-gray-100);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    color: var(--ls-gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    box-sizing: border-box;
}

.tk-event-popup-close:hover {
    background: var(--ls-gray-200);
}

.tk-event-popup-body {
    padding: 16px 24px 24px;
}

.tk-popup-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--ls-gray-100);
}

.tk-popup-row:last-child {
    border-bottom: none;
}

.tk-popup-label {
    font-size: 14px;
    color: var(--ls-gray-500);
    min-width: 100px;
}

.tk-popup-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--ls-gray-900);
    text-align: right;
}

/* --- Desktop: Popup zentriert statt Sheet --- */
@media (min-width: 769px) {
    .tk-event-popup-overlay {
        align-items: center;
    }

    .tk-event-popup {
        border-radius: 16px;
        animation-name: tk-popup-scale-in;
    }

    .tk-popup-enter {
        animation-name: tk-popup-scale-in;
    }

    @keyframes tk-popup-scale-in {
        from {
            opacity: 0;
            transform: scale(0.95);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }
}

/* --- Responsive Kalender --- */
@media (max-width: 768px) {
    .tk-cal-layout {
        flex-direction: column;
    }

    .tk-mini-cal {
        width: 100%;
        min-width: 0;
    }

    .tk-cal-container {
        width: 100%;
    }

    .tk-segment-control {
        width: 100%;
        justify-content: center;
    }

    .tk-cal-nav {
        justify-content: center;
    }

    .tk-cal-nav-label {
        width: 100%;
        text-align: center;
        margin-left: 0;
        margin-top: 4px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .tk-teaser-features {
        grid-template-columns: 1fr;
    }

    .tk-doctor-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .tk-filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .tk-insurance-stats {
        flex-direction: column;
    }

    .tk-subtab-link {
        padding: 10px 12px;
        font-size: 12px;
    }

    .tk-subtab-icon {
        display: none;
    }

    .tk-quick-links {
        grid-template-columns: 1fr;
    }

    .tk-preview-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .tk-preview-select {
        width: 100%;
    }
}

/* ============================================================================
   VISUELLE VERBESSERUNGEN
   ============================================================================ */

/* Smooth Card Hover */
.ls-portal-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ls-portal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* Glasmorphism-Sidebar */
.ls-portal-sidebar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Focus-Visible States (Accessibility) */
.ls-portal-btn:focus-visible,
.ls-portal-input:focus-visible,
.tk-quick-link:focus-visible {
    outline: 2px solid var(--ls-primary);
    outline-offset: 2px;
}

/* Aktiv-Badge Pulse */
.ls-portal-badge-success {
    animation: tk-pulse 2s ease-in-out infinite;
}

@keyframes tk-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Schnellzugriff-Cards Hover Lift */
.ls-portal-quick-action {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ls-portal-quick-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* Edit-Form Slide-Down Animation */
.tk-edit-form {
    animation: tk-slide-down 0.25s ease-out;
}

@keyframes tk-slide-down {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sidebar Nav-Item Hover */
.ls-portal-nav-item a {
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* Stats-Cards Gradient Hover */
.ls-portal-stat-card:hover {
    background: linear-gradient(135deg, #f0f7ff 0%, #fff 100%);
}
