/**
 * TSC Mondial Transponder Management System
 * Custom CSS Styles
 */

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

/* E-Mail-Spalten: kein ungewollter Umbruch mitten im Wort */
td a[href^="mailto:"],
td:nth-child(4) {
    word-break: break-all;
}

/* Schnellaktionen: gleiche Button-Höhe */
.quick-actions .btn {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Card Styles */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    border-top-left-radius: 0.5rem !important;
    border-top-right-radius: 0.5rem !important;
    font-weight: 600;
}

/* Dashboard Cards */
.dashboard-card {
    transition: transform 0.3s;
    height: 100%;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Status Badges */
.status-badge {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
}

.status-available { background-color: #e3fcef; color: #1cc88a; }
.status-assigned { background-color: #eaf4fc; color: #4e73df; }
.status-maintenance { background-color: #fff3cd; color: #f6c23e; }
.status-lost { background-color: #f8d7da; color: #e74a3b; }
.status-active { background-color: #e3fcef; color: #1cc88a; }
.status-returned { background-color: #eaf4fc; color: #4e73df; }
.status-inactive { background-color: #f8d7da; color: #e74a3b; }
.status-suspended { background-color: #fff3cd; color: #f6c23e; }

/* Form Styles */
.required-field::after {
    content: "*";
    color: red;
    margin-left: 5px;
}

/* Table Styles */
.table th {
    font-weight: 600;
    background-color: #f8f9fa;
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Scrollable table container for Assignment History */
.scrollable-history-table {
    max-height: 300px; /* Adjust height as needed */
    overflow-y: auto;  /* Enable vertical scrollbar */
}

/* Form Header Styles */
.form-header {
    border-radius: 0.25rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    /* Ensure background is primary blue and text is white - already handled by classes */
}

.form-header .breadcrumb {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 0; /* Remove default margin */
    background-color: #f8f9fa !important; /* Override default light background if needed */
    border-radius: 0.25rem; /* Match header rounding */
}

.form-header .breadcrumb-item a {
    color: #007bff; /* Standard link color */
}

.form-header .breadcrumb-item.active {
    color: #6c757d; /* Muted color for active item */
}

.form-header .header-actions a {
    transition: opacity 0.2s;
    color: #fff; /* Ensure links are white */
}

.form-header .header-actions a:hover {
    opacity: 0.8;
    text-decoration: none;
}

.form-header .header-actions .badge { /* Style role badge if needed */
    font-size: 0.85em;
}

/* Adjustments for smaller screens if necessary */
@media (max-width: 768px) {
    .form-header .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    .form-header h2 {
        margin-bottom: 0.5rem !important;
    }
    .form-header .header-actions {
        width: 100%;
        justify-content: flex-end; /* Align actions to the right */
        margin-top: 0.5rem;
    }
}

/* Dashboard Activity Badge Contrast Fix */
.card-body .table .badge.bg-success {
    background-color: #c3e6cb !important; /* Lighter green */
    color: #155724 !important; /* Darker green text */
}

.card-body .table .badge.bg-primary {
    background-color: #b8daff !important; /* Lighter blue */
    color: #004085 !important; /* Darker blue text */
}

.card-body .table .badge.bg-danger {
    background-color: #f5c6cb !important; /* Lighter red */
    color: #721c24 !important; /* Darker red text */
}
