/* ============================================================
   Portal - Hauptstylesheet
   Enthält alle Basis-Styles, inkl. Tabellen-Scrollbarkeit
   ============================================================ */

/* ---------- Grundlegendes ---------- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* ---------- Tabellen-Scrollbarkeit ---------- */
.table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}
.table-responsive .table {
    min-width: 800px;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    width: 100%;
}
.table-responsive .table {
    min-width: 600px; /* Verhindert zu schmale Tabelle auf kleinen Bildschirmen */
    margin-bottom: 0;
}

/* Für alle Tabellen, die nicht in .table-responsive sind (z.B. kleine Hilfstabellen) */
.table-scrollable {
    overflow-x: auto;
    display: block;
    white-space: nowrap;
}

/* ---------- Dashboard-Kacheln ---------- */
.dashboard-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    border-radius: 15px;
    height: 100%;
    cursor: pointer;
}
.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}
.tile-handle {
    cursor: move;
    color: #999;
}
.tile-handle:hover {
    color: #333;
}
.notification-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    z-index: 10;
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ---------- Info-Karten ---------- */
.info-card {
    transition: transform 0.2s;
    margin-bottom: 1rem;
    border-left: 4px solid;
    cursor: pointer;
}
.info-card:hover {
    transform: translateX(5px);
}
.info-warning { border-left-color: #ffc107; background-color: #fff9e6; }
.info-danger { border-left-color: #dc3545; background-color: #fff5f5; }
.info-success { border-left-color: #28a745; background-color: #e8f5e9; }
.info-info { border-left-color: #17a2b8; background-color: #e6f7ff; }

/* ---------- Quick Stats ---------- */
.quick-stat {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    transition: transform 0.2s;
}
.quick-stat:hover {
    transform: scale(1.05);
}
.quick-stat-number {
    font-size: 1.3rem;
    font-weight: bold;
}
.quick-stat-label {
    font-size: 0.7rem;
    color: #6c757d;
}

/* ---------- Dropdown-Menü Module ---------- */
.dropdown-menu-custom {
    max-height: 500px;
    overflow-y: auto;
    min-width: 280px;
}
.dropdown-item i {
    width: 28px;
    margin-right: 8px;
}
.dropdown-header {
    font-weight: bold;
    background-color: #f8f9fa;
}
.badge-notification {
    float: right;
    margin-top: 2px;
}

/* ---------- Listen (z.B. Erinnerungen, Nachrichten) ---------- */
.list-group-item.unread {
    background-color: #fff3cd;
    font-weight: bold;
}
.list-group-item.unread:hover {
    background-color: #ffeaa7;
}

/* ---------- Signaturen, Unterschriften ---------- */
.signature-pad {
    border: 2px solid #ccc;
    background: #fff;
    width: 100%;
    height: 200px;
    border-radius: 8px;
    touch-action: none;
    cursor: crosshair;
}
.signature-container {
    position: relative;
    display: inline-block;
    width: 100%;
}
.signature-clear {
    margin-top: 5px;
}

/* ---------- Buttons ---------- */
.calculation-btn {
    background-color: #6c757d;
    color: white;
    border: none;
}
.calculation-btn:hover {
    background-color: #5a6268;
    color: white;
}

/* ---------- Responsive Anpassungen ---------- */
@media (max-width: 768px) {
    .dashboard-card .card-title {
        font-size: 1.1rem;
    }
    .card-icon {
        font-size: 2rem;
    }
}