/* components.css - Alle Komponenten-Styles aus Ihrer index.html */

/* Header-Komponenten */
.logo-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

h1 {
    font-size: 1.25rem;
    font-weight: 300;
    margin: 0;
}

.company-badges {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    width: 100%;
}

.company-badge {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.875rem;
    min-width: var(--min-touch-target);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    max-width: 100px;
}

.company-badge.active {
    background: white;
    color: var(--primary-blue);
}

#current-time {
    color: rgba(255,255,255,0.8);
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

/* Tab Navigation */
.tab-navigation {
    background: white;
    border-bottom: 2px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 90;
    overflow: hidden;
}

.tab-scroll-container {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tab-scroll-container::-webkit-scrollbar {
    display: none;
}

.tab {
    flex: 0 0 auto;
    min-width: 80px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    background: white;
    border-bottom: 3px solid transparent;
}

.tab:active {
    transform: scale(0.95);
}

.tab.active {
    background: var(--light-blue);
    border-bottom: 3px solid var(--primary-blue);
}

.tab-icon {
    font-size: 20px;
}

.tab-label {
    font-size: 11px;
    color: var(--gray);
    font-weight: 600;
}

.tab.active .tab-label {
    color: var(--primary-blue);
}

.tab-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff4444;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    min-width: 16px;
    text-align: center;
}

/* Search & Filter */
.search-box {
    width: 100%;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s;
    min-height: var(--min-touch-target);
}

.search-box input:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(46,79,124,0.1);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.filter-btn {
    padding: 0.625rem 1rem;
    border: 2px solid var(--secondary-blue);
    background: white;
    color: var(--secondary-blue);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 0.875rem;
    min-height: var(--min-touch-target);
    flex: 1 1 auto;
    min-width: fit-content;
    text-align: center;
}

.filter-btn.active {
    background: var(--secondary-blue);
    color: white;
}

.filter-btn.refresh {
    background: var(--success-light);
    color: var(--success);
    border-color: var(--success);
}

/* Statistik-Komponenten */
.stat-item {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.stat-label {
    font-size: 0.625rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-blue);
}

/* Tenant Cards */
.tenant-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 0.75rem;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    margin: 0 0.25rem;
}

.tenant-card:active {
    transform: scale(0.98);
}

.tenant-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.tenant-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--primary-blue);
    word-break: break-word;
    line-height: 1.2;
}

.tenant-meta {
    color: var(--gray);
    font-size: 0.6875rem;
    margin-top: 0.125rem;
}

.status-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: flex-end;
    max-width: 40%;
}

.status-badge, .comm-badge, .todo-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-active {
    background: var(--success-light);
    color: var(--success);
}

.status-inactive {
    background: #ffebee;
    color: #c62828;
}

.comm-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    padding: 0;
}

.comm-allowed {
    background: var(--success-light);
    color: var(--success);
}

.comm-forbidden {
    background: #ffebee;
    color: #c62828;
}

.todo-badge {
    background: #fff3e0;
    color: #e65100;
}

.tenant-info {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    font-size: 0.8125rem;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
    color: #666;
    line-height: 1.3;
}

.info-icon {
    min-width: 16px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    font-size: 0.75rem;
}

.info-text {
    flex: 1;
    word-break: break-word;
}

/* Action Buttons */
.action-buttons {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.btn-action {
    flex: 1;
    min-width: fit-content;
    padding: 0.625rem 1rem;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.875rem;
    text-align: center;
    min-height: var(--min-touch-target);
    white-space: nowrap;
}

.btn-action:active {
    background: var(--light-blue);
    border-color: var(--secondary-blue);
    color: var(--secondary-blue);
}

/* Floating Action Menu */
.floating-action-menu {
    position: fixed;
    bottom: var(--fab-bottom);
    right: 20px;
    z-index: 1000;
}

.main-fab {
    width: var(--fab-size);
    height: var(--fab-size);
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.875rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transition: all 0.3s;
    position: relative;
    z-index: 2;
}

.main-fab:active {
    transform: scale(0.95);
}

.main-fab.active {
    transform: rotate(45deg);
    background: linear-gradient(135deg, var(--danger), #d32f2f);
}

.sub-menu {
    position: absolute;
    bottom: calc(var(--fab-size) + 10px);
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-end;
}

.sub-menu-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 30px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    min-height: var(--min-touch-target);
}

.sub-menu-item:active {
    transform: translateX(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

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

.modal {
    background: white;
    width: 100%;
    height: 100%;
    max-height: 100vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-body {
    padding: 1rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    min-height: var(--min-touch-target);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(46,79,124,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    position: sticky;
    bottom: 0;
    background: white;
    padding: 1rem 0;
}

.btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-height: var(--min-touch-target);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
}

.btn-secondary {
    background: white;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}
