/* Room Rental Management System CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #F8FAFC;
    color: #0F172A;
    line-height: 1.6;
}

/* Layout */
.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid #E5E7EB;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
}

.sidebar-header h1 {
    font-size: 1.25rem;
    color: #2563EB;
    font-weight: 600;
}

.nav-menu {
    list-style: none;
    padding: 1rem 0;
}

.nav-item {
    margin: 0.25rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: #64748B;
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    background-color: #F1F5F9;
    color: #2563EB;
}

.nav-link .icon {
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

/* Main content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Page header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 600;
    color: #0F172A;
    margin: 0;
}

/* Header */
.header {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.breadcrumb {
    color: #64748B;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: #2563EB;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Content area */
.content {
    flex: 1;
    padding: 2rem;
}

/* Cards */
.card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: between;
    align-items: center;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0F172A;
}

.card-body {
    padding: 1.5rem;
}

/* Stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #2563EB;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #64748B;
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background-color: #2563EB;
    color: white;
}

.btn-primary:hover {
    background-color: #1D4ED8;
}

.btn-success {
    background-color: #16A34A;
    color: white;
}

.btn-success:hover {
    background-color: #15803D;
}

.btn-danger {
    background-color: #E11D48;
    color: white;
}

.btn-danger:hover {
    background-color: #BE185D;
}

.btn-secondary {
    background-color: #64748B;
    color: white;
}

.btn-secondary:hover {
    background-color: #475569;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #E5E7EB;
    color: #64748B;
}

.btn-outline:hover {
    background-color: #F8FAFC;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

/* Tables */
.table-container {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

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

.table th {
    background-color: #F8FAFC;
    font-weight: 600;
    color: #374151;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table tbody tr:hover {
    background-color: #F8FAFC;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #D1D5DB;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Search and filters */
.search-filters {
    background: white;
    padding: 1.5rem;
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: end;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 2rem 0;
    gap: 0.25rem;
}

.page-item {
    display: block;
}

.page-link {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #64748B;
    border: 1px solid #E5E7EB;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.page-link:hover {
    background-color: #F8FAFC;
    color: #2563EB;
}

.page-item.active .page-link {
    background-color: #2563EB;
    color: white;
    border-color: #2563EB;
}

.page-item.disabled .page-link {
    color: #9CA3AF;
    cursor: not-allowed;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #0F172A;
}

.modal-text {
    margin-bottom: 2rem;
    color: #64748B;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    min-width: 300px;
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    border-left: 4px solid #16A34A;
}

.toast.error {
    border-left: 4px solid #E11D48;
}

.toast.warning {
    border-left: 4px solid #F59E0B;
}

.toast.info {
    border-left: 4px solid #2563EB;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        order: 2;
    }
    
    .main-content {
        order: 1;
    }
    
    .nav-menu {
        display: flex;
        overflow-x: auto;
        padding: 0.5rem;
    }
    
    .nav-item {
        flex-shrink: 0;
        margin: 0 0.25rem;
    }
    
    .nav-link {
        padding: 0.5rem 1rem;
        white-space: nowrap;
    }
    
    .content {
        padding: 1rem;
    }
    
    .header {
        padding: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .search-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .modal-content {
        margin: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    text-align: center;
}

.badge-success {
    background-color: #DCFCE7;
    color: #166534;
}

.badge-warning {
    background-color: #FEF3C7;
    color: #92400E;
}

.badge-danger {
    background-color: #FEE2E2;
    color: #991B1B;
}

.badge-info {
    background-color: #DBEAFE;
    color: #1E40AF;
}

.badge-secondary {
    background-color: #F1F5F9;
    color: #475569;
}

/* Action bar for mobile forms */
.action-bar {
    position: sticky;
    bottom: 0;
    background: white;
    border-top: 1px solid #E5E7EB;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .action-bar {
        position: fixed;
        left: 0;
        right: 0;
        z-index: 100;
    }
}

/* User menu styles */
.header-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.user-name {
    font-weight: 600;
    color: #0F172A;
    font-size: 0.875rem;
}

.user-role {
    font-size: 0.75rem;
    color: #64748B;
}

.user-actions .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Role badge styles */
.role-info {
    margin-bottom: 1rem;
}

.role-info h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.role-info p {
    font-size: 0.875rem;
    color: #64748B;
    margin-bottom: 1rem;
}

/* Info items */
.info-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #E5E7EB;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #0F172A;
}

@media (max-width: 768px) {
    .header-actions {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-end;
    }
    
    .user-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .user-info {
        align-items: center;
        text-align: center;
    }
}