/* Keep10 Tenant Portal Styles */

:root {
    --primary: #2d6a4f;
    --primary-dark: #1b4332;
    --secondary: #52b788;
    --danger: #d62828;
    --warning: #f77f00;
    --info: #0077b6;
    --light: #f8f9fa;
    --dark: #212529;
    --border: #dee2e6;
    --success: #2d6a4f;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

/* Header */
header {
    background: var(--primary);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    text-decoration: none;
}

.logo em {
    font-style: italic;
}

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

.user-name {
    font-size: 0.9rem;
}

.logout-btn {
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Navigation */
nav {
    background: white;
    border-bottom: 1px solid var(--border);
}

nav ul {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    display: block;
    padding: 1rem 0;
    color: var(--dark);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

nav a:hover,
nav a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Rent Status */
.rent-status {
    padding: 2rem;
    text-align: center;
    border-radius: 10px;
}

.rent-status.paid {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid var(--success);
}

.rent-status.due-soon {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid var(--warning);
}

.rent-status.overdue {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid var(--danger);
}

.rent-status.upcoming {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border: 2px solid var(--info);
}

.status-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.status-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.rent-amount {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.due-date {
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Payment History */
.payment-list {
    list-style: none;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

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

.payment-period {
    font-weight: 600;
}

.payment-amount {
    color: var(--success);
    font-weight: 600;
}

.payment-status {
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    background: var(--success);
    color: white;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

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

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

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

.btn-block {
    width: 100%;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Maintenance Requests */
.request-list {
    list-style: none;
}

.request-item {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.urgency-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.urgency-low {
    background: #d1ecf1;
    color: #0c5460;
}

.urgency-medium {
    background: #fff3cd;
    color: #856404;
}

.urgency-high {
    background: #f8d7da;
    color: #721c24;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-in_progress {
    background: #d1ecf1;
    color: #0c5460;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.request-description {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.request-date {
    font-size: 0.85rem;
    color: #adb5bd;
}

/* Notices */
.notice-item {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.notice-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.notice-item.unread {
    border-left: 4px solid var(--primary);
    background: #f8f9fa;
}

.notice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.notice-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.notice-type {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.type-general {
    background: #e2e3e5;
    color: #383d41;
}

.type-maintenance {
    background: #fff3cd;
    color: #856404;
}

.type-payment {
    background: #f8d7da;
    color: #721c24;
}

.type-lease {
    background: #d1ecf1;
    color: #0c5460;
}

.notice-content {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.notice-date {
    font-size: 0.85rem;
    color: #adb5bd;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary);
}

.login-logo em {
    font-style: italic;
}

.login-subtitle {
    color: #6c757d;
    margin-top: 0.5rem;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .request-header,
    .notice-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .payment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    main {
        padding: 0 1rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .rent-amount {
        font-size: 2rem;
    }
}
