/**
 * Custom styles for LandLord Assist
 * Modern dashboard design inspired by Intercom
 */

/* Inter font - Modern sans-serif font similar to Intercom */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f7fa;
    color: #1a2b42;
    line-height: 1.5;
}

/* Custom colors */
:root {
    --color-primary: #2d6ae0;
    --color-primary-dark: #1e55c0;
    --color-primary-light: #e8f0fe;
    --color-secondary: #10B981;
    --color-accent: #6366f1;
    --color-dark: #1a2b42;
    --color-light: #f5f7fa;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 0.25rem;
    --radius: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: white;
    border-right: 1px solid var(--color-gray-200);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 30;
    transition: all 0.3s ease;
}

.sidebar-collapsed {
    width: 80px;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    transition: margin-left 0.3s ease;
}

.main-content-expanded {
    margin-left: 80px;
}

.content-wrapper {
    padding: 2rem;
}

/* Header */
.app-header {
    background-color: white;
    border-bottom: 1px solid var(--color-gray-200);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.5rem;
}

/* Sidebar Navigation */
.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-gray-200);
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--color-gray-500);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
}

.sidebar-toggle:hover {
    background-color: var(--color-gray-100);
}

.nav-section {
    padding: 1rem 0;
}

.nav-section-title {
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-gray-500);
    letter-spacing: 0.05em;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--color-gray-700);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background-color: var(--color-gray-100);
    color: var(--color-primary);
}

.nav-item.active {
    color: var(--color-primary);
    background-color: var(--color-primary-light);
    border-left-color: var(--color-primary);
    font-weight: 500;
}

.nav-icon {
    margin-right: 0.75rem;
    width: 20px;
    height: 20px;
}

.sidebar-collapsed .nav-text {
    display: none;
}

.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar-collapsed .nav-icon {
    margin-right: 0;
}

.sidebar-collapsed .sidebar-header {
    justify-content: center;
}

.sidebar-collapsed .logo-text {
    display: none;
}

/* Cards */
.card {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--color-gray-900);
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-gray-200);
    background-color: var(--color-gray-50);
}

.hover-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Stat Cards */
.stat-card {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    background-color: white;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.stat-title {
    font-size: 0.875rem;
    color: var(--color-gray-500);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--color-gray-900);
}

.stat-description {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-gray-600);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.stat-icon-primary {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
}

.stat-icon-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-secondary);
}

.stat-icon-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.stat-icon-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge-pending {
    background-color: #FEF3C7;
    color: #92400E;
}

.status-badge-in-progress {
    background-color: #DBEAFE;
    color: #1E40AF;
}

.status-badge-completed {
    background-color: #D1FAE5;
    color: #065F46;
}

.status-badge-cancelled {
    background-color: #FEE2E2;
    color: #B91C1C;
}

/* Priority badges */
.priority-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.priority-badge-low {
    background-color: #E5E7EB;
    color: #374151;
}

.priority-badge-medium {
    background-color: #DBEAFE;
    color: #1E40AF;
}

.priority-badge-high {
    background-color: #FFEDD5;
    color: #9A3412;
}

.priority-badge-emergency {
    background-color: #FEE2E2;
    color: #B91C1C;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.data-table th {
    background-color: var(--color-gray-50);
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-gray-600);
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--color-gray-200);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-gray-200);
    font-size: 0.875rem;
    color: var(--color-gray-700);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background-color: var(--color-gray-50);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-icon {
    margin-right: 0.5rem;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
}

.btn-secondary {
    background-color: white;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-primary-light);
}

.btn-success {
    background-color: var(--color-secondary);
    color: white;
}

.btn-success:hover {
    background-color: #0da271;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-gray-700);
}

.form-input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(45, 106, 224, 0.2);
}

.form-select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background-color: white;
    transition: all 0.2s ease;
}

.form-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(45, 106, 224, 0.2);
}

/* Notifications */
.notifications-dropdown {
    position: relative;
}

.notifications-icon {
    position: relative;
    padding: 0.5rem;
    color: var(--color-gray-600);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.notifications-icon:hover {
    background-color: var(--color-gray-100);
    color: var(--color-primary);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(25%, -25%);
}

.notifications-panel {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 40;
    overflow: hidden;
    margin-top: 0.5rem;
}

.notifications-header {
    padding: 1rem;
    border-bottom: 1px solid var(--color-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notifications-title {
    font-weight: 600;
    color: var(--color-gray-900);
}

.notifications-list {
    max-height: 320px;
    overflow-y: auto;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid var(--color-gray-200);
    transition: all 0.2s ease;
}

.notification-item:hover {
    background-color: var(--color-gray-50);
}

.notification-item.unread {
    background-color: var(--color-primary-light);
}

.notification-content {
    font-size: 0.875rem;
    color: var(--color-gray-700);
}

.notification-time {
    font-size: 0.75rem;
    color: var(--color-gray-500);
    margin-top: 0.25rem;
}

.notifications-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--color-gray-200);
    text-align: center;
}

.notifications-footer a {
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.notifications-footer a:hover {
    text-decoration: underline;
}

/* User dropdown */
.user-dropdown {
    position: relative;
}

.user-menu-button {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-menu-button:hover {
    background-color: var(--color-gray-100);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 0.5rem;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-gray-800);
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 40;
    overflow: hidden;
    margin-top: 0.5rem;
}

.user-menu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--color-gray-700);
    text-decoration: none;
    transition: all 0.2s ease;
}

.user-menu-item:hover {
    background-color: var(--color-gray-100);
}

.user-menu-item.danger {
    color: #ef4444;
}

.user-menu-item.danger:hover {
    background-color: #fee2e2;
}

.user-menu-icon {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
}

/* Flash messages */
.flash-message {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    animation: flashFadeIn 0.3s ease-in-out;
}

.flash-message-success {
    background-color: #D1FAE5;
    color: #065F46;
    border-left: 4px solid #10B981;
}

.flash-message-error {
    background-color: #FEE2E2;
    color: #B91C1C;
    border-left: 4px solid #EF4444;
}

.flash-message-warning {
    background-color: #FEF3C7;
    color: #92400E;
    border-left: 4px solid #F59E0B;
}

.flash-message-info {
    background-color: #DBEAFE;
    color: #1E40AF;
    border-left: 4px solid #3B82F6;
}

.flash-icon {
    margin-right: 0.75rem;
}

@keyframes flashFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
.app-footer {
    background-color: white;
    border-top: 1px solid var(--color-gray-200);
    padding: 1.5rem 2rem;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-weight: 600;
    color: var(--color-gray-700);
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--color-gray-500);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
    }
    
    .sidebar .nav-text {
        display: none;
    }
    
    .sidebar .nav-item {
        justify-content: center;
        padding: 0.75rem;
    }
    
    .sidebar .nav-icon {
        margin-right: 0;
    }
    
    .sidebar .sidebar-header {
        justify-content: center;
    }
    
    .sidebar .logo-text {
        display: none;
    }
    
    .main-content {
        margin-left: 80px;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 1.5rem;
    }
    
    .app-header {
        padding: 1rem;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar .nav-text {
        display: block;
    }
    
    .sidebar .nav-item {
        justify-content: flex-start;
        padding: 0.75rem 1.5rem;
    }
    
    .sidebar .nav-icon {
        margin-right: 0.75rem;
    }
    
    .sidebar .sidebar-header {
        justify-content: space-between;
    }
    
    .sidebar .logo-text {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-button {
        display: block;
    }
}

@media (max-width: 640px) {
    .content-wrapper {
        padding: 1rem;
    }
}