/* Custom styles for Vermietung Management */

:root {
    /* Primary colors - Professional Real Estate */
    --primary-color: #0891b2;      /* Teal - Trust & Stability */
    --secondary-color: #06b6d4;    /* Cyan - Fresh & Modern */
    --accent-color: #f59e0b;       /* Amber - Warmth & Premium */

    /* Semantic colors */
    --success-color: #10b981;      /* Emerald green */
    --info-color: #3b82f6;         /* Blue */
    --warning-color: #f59e0b;      /* Amber */
    --danger-color: #ef4444;       /* Red */

    /* Shadows */
    --card-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 1rem 2.5rem rgba(0, 0, 0, 0.15);

    /* Reusable gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-info: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-secondary: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);

    /* Standard transition */
    --transition-standard: all 0.3s ease;
}

body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', 'Arial', sans-serif;
    letter-spacing: -0.011em;
    font-weight: 400;
}

.navbar {
    background: var(--gradient-primary) !important;
    box-shadow: 0 0.125rem 0.625rem rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
}

.nav-link {
    transition: var(--transition-standard);
    border-radius: 0.5rem;
    margin: 0 0.25rem;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-0.125rem);
}

.card {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition-standard);
    background: white;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-0.25rem);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: none;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    border-radius: 1rem 1rem 0 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
}

.btn {
    border-radius: 0.625rem;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    transition: var(--transition-standard);
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
}

.btn-primary:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.375rem 1.25rem rgba(8, 145, 178, 0.4);
}

.btn-success {
    background: var(--gradient-success);
}

.btn-info {
    background: var(--gradient-info);
}

.btn-warning {
    background: var(--gradient-warning);
    color: #ffffff;
}

.btn-group .btn {
    margin-right: 0.25rem;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

.badge {
    font-size: 0.75em;
    padding: 0.4em 0.8em;
    border-radius: 0.5rem;
    font-weight: 500;
}

.alert {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}

.form-control,
.form-select {
    border-radius: 0.625rem;
    border: 0.125rem solid #e9ecef;
    padding: 0.6rem 1rem;
    transition: var(--transition-standard);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(8, 145, 178, 0.15);
}

.mieter-row {
    border: 0.0625rem solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.9375rem;
    margin-bottom: 0.9375rem;
    background-color: #f8f9fa;
}

.mieter-row:first-child {
    border-color: #0d6efd;
    background-color: #e7f1ff;
}

/* Dashboard specific styles */
.card.bg-primary {
    background: var(--gradient-primary) !important;
    border: none;
}

.card.bg-success {
    background: var(--gradient-success) !important;
    border: none;
}

.card.bg-info {
    background: var(--gradient-info) !important;
    border: none;
}

.card.bg-primary .card-body,
.card.bg-success .card-body,
.card.bg-info .card-body {
    padding: 1.75rem;
}

.card.bg-primary:hover,
.card.bg-success:hover,
.card.bg-info:hover {
    transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .btn-group {
        display: flex;
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin-bottom: 2px;
        margin-right: 0;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* PDF generation styles */
.pdf-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    
    .btn {
        display: none !important;
    }
}

/* Enhanced table styling */
.table {
    border-radius: 0.75rem;
    overflow: hidden;
}

.table thead th {
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    padding: 1rem;
    border: none;
    text-align: center;
    letter-spacing: 0.03125rem;
}

.table tbody tr {
    transition: var(--transition-standard);
}

.table tbody tr:hover {
    background-color: #f8f9fc;
    transform: translateY(-0.0625rem);
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 0.0625rem solid #f0f0f0;
}

.table td code {
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.625rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9em;
}

.table-responsive {
    border-radius: 0.75rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
    background: white;
}

/* Special value highlighting */
.table td.calculated-value {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    font-weight: 600;
    text-align: right;
    border-radius: 0.5rem;
}

/* Footer styling */
footer {
    background: white !important;
    border-top: 1px solid #e9ecef;
    margin-top: 4rem !important;
}

/* Page titles */
h1, h2, h3, h4, h5, h6 {
    color: #2c3e50;
    font-weight: 600;
    letter-spacing: -0.025em;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', 'Arial', sans-serif;
}

h1 i, h2 i, h3 i, h4 i, h5 i {
    color: var(--primary-color);
}

/* Smooth animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(1.25rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dropdown menus */
.dropdown-menu {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 0.5rem;
    padding: 0.6rem 1rem;
    transition: var(--transition-standard);
}

.dropdown-item:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateX(0.25rem);
}

/* Loading states */
.spinner-border {
    border-width: 0.1875rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 0.625rem;
    height: 0.625rem;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0.625rem;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 0.625rem;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Page Header */
.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
}

/* Stat Cards */
.stat-card {
    transition: var(--transition-standard);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-0.5rem);
}

.stat-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Action Cards */
.action-card {
    transition: var(--transition-standard);
    cursor: pointer;
    border: 0.125rem solid transparent !important;
}

.action-card:hover {
    border-color: var(--primary-color) !important;
    transform: translateY(-0.5rem);
}

.action-card .action-icon {
    transition: var(--transition-standard);
}

.action-card .action-icon i {
    color: var(--primary-color);
}

.action-card:hover .action-icon i {
    transform: scale(1.2);
    color: var(--secondary-color);
}

.action-card .card-title {
    color: #2c3e50;
    font-weight: 600;
}

/* Better spacing */
.g-4 {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}

/* Empty states */
.text-muted i {
    display: block;
}

/* Badge improvements */
.badge {
    font-weight: 500;
    letter-spacing: 0.3px;
}

.badge.bg-secondary {
    background: var(--gradient-secondary) !important;
}
