* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

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

.login-container { width: 100%; max-width: 400px; padding: 20px; }

.navbar {
    background: #1a1a2e; color: white; padding: 0 20px;
    position: sticky; top: 0; z-index: 100;
}

.nav-container { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; height: 56px; }

.nav-brand { color: white; text-decoration: none; font-size: 1.2rem; font-weight: bold; }

.nav-menu { margin-left: auto; display: flex; gap: 5px; }

.nav-link {
    color: #ccc; text-decoration: none; padding: 8px 14px; border-radius: 6px;
    transition: all 0.2s; font-size: 0.9rem;
}

.nav-link:hover { background: rgba(255,255,255,0.1); color: white; }

.container { max-width: 1200px; margin: 20px auto; padding: 0 20px; }

h1 { font-size: 1.6rem; margin-bottom: 16px; color: #1a1a2e; }

.card {
    background: white; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 16px; overflow: hidden;
}

.card-header {
    padding: 14px 20px; border-bottom: 1px solid #eee; background: #fafafa;
}

.card-header h3 { font-size: 1.1rem; margin: 0; }

.card-body { padding: 20px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

.stat-card {
    background: white; border-radius: 10px; padding: 20px; text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-value { font-size: 1.6rem; font-weight: bold; margin-bottom: 4px; }

.stat-label { font-size: 0.85rem; color: #666; }

.text-success { color: #28a745 !important; }
.text-danger { color: #dc3545 !important; }
.text-warning { color: #ffc107 !important; }

.form-group { margin-bottom: 14px; flex: 1; }

.form-group label { display: block; margin-bottom: 4px; font-weight: 500; font-size: 0.9rem; }

.form-group small { color: #888; font-size: 0.8rem; }

.form-control {
    width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px;
    font-size: 0.95rem; transition: border-color 0.2s;
}

.form-control:focus { outline: none; border-color: #1a1a2e; box-shadow: 0 0 0 3px rgba(26,26,46,0.1); }

.form-control-static { padding: 8px 0; display: inline-block; font-weight: bold; font-size: 1.1rem; }

.form-row { display: flex; gap: 14px; }

.btn {
    padding: 8px 18px; border: none; border-radius: 6px; cursor: pointer;
    font-size: 0.9rem; font-weight: 500; transition: all 0.2s; display: inline-block;
}

.btn:hover { opacity: 0.85; }

.btn-primary { background: #1a1a2e; color: white; }
.btn-success { background: #28a745; color: white; }
.btn-danger { background: #dc3545; color: white; }
.btn-warning { background: #ffc107; color: #333; }
.btn-info { background: #17a2b8; color: white; }
.btn-secondary { background: #6c757d; color: white; }
.btn-block { width: 100%; }

.btn-sm { padding: 4px 12px; font-size: 0.82rem; }

.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }

.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; }

.table th { background: #f8f9fa; font-weight: 600; font-size: 0.85rem; color: #555; }

.table tr:hover { background: #f8f9fa; }

.badge {
    display: inline-block; padding: 3px 10px; border-radius: 12px;
    font-size: 0.78rem; font-weight: 600;
}

.badge-success { background: #d4edda; color: #155724; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-info { background: #d1ecf1; color: #0c5460; }

.tenant-name-link { color: #1a1a2e; text-decoration: none; }
.tenant-name-link:hover { text-decoration: underline; }

.alert {
    padding: 12px 18px; border-radius: 8px; margin-bottom: 14px;
    font-size: 0.9rem;
}

.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

.tenant-card {
    border: 1px solid #eee; border-radius: 8px; padding: 14px; margin-bottom: 10px;
}

.tenant-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

.tenant-details { font-size: 0.88rem; color: #555; margin-bottom: 8px; }

.tenant-details span { margin-right: 18px; }

.tenant-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }

.hidden { display: none; }

.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); display: flex; justify-content: center;
    align-items: flex-start; padding-top: 60px; z-index: 1000;
}

.modal-content {
    background: white; border-radius: 12px; padding: 24px;
    max-width: 650px; width: 90%; max-height: 80vh; overflow-y: auto;
    position: relative; box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.close {
    position: absolute; top: 12px; right: 18px; font-size: 1.8rem;
    cursor: pointer; color: #888;
}

.close:hover { color: #333; }

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { flex-direction: column; gap: 0; }
    .nav-menu { gap: 2px; }
    .nav-link { padding: 8px 10px; font-size: 0.8rem; }
}
