body { background-color: #f0fdf4; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
#loginOverlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #14532d; z-index: 999999; display: flex; justify-content: center; align-items: center; flex-direction: column; color: white; }
.login-box { background: white; padding: 30px; border-radius: 10px; width: 350px; color: #333; text-align: center; box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
#mainApp { display: none; }
.header-bar { background-color: #14532d; color: white; padding: 15px 0; border-bottom: 4px solid #4ade80; }
.digital-clock { font-family: 'Courier New', monospace; color: #14532d; font-weight: bold; font-size: 1.1rem; background: #dcfce7; padding: 8px 20px; border-radius: 5px; border: 1px solid #14532d; display: inline-block; }
.nav-pills .nav-link { color: #666; font-weight: 600; background: transparent; border: 1px solid transparent; }
.nav-pills .nav-link:hover { color: #14532d; background-color: #dcfce7; }
.nav-pills .nav-link.active { background-color: white !important; color: #14532d !important; border: 2px solid #14532d; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.stat-card { border: none; border-radius: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); color: white; transition: transform 0.2s; position: relative; overflow: hidden; }
.stat-card:hover { transform: translateY(-5px); }
.bg-harvest { background: linear-gradient(45deg, #15803d, #4ade80); }
.bg-weight { background: linear-gradient(45deg, #4f46e5, #818cf8); }
.bg-sales { background: linear-gradient(45deg, #b45309, #fbbf24); }

.house-card { background: linear-gradient(135deg, #22c55e, #14532d); padding: 20px 15px; margin-bottom: 15px; box-shadow: 0 4px 8px rgba(0,0,0,0.15); border-radius: 12px; text-align: center; transition: transform 0.2s; border: none; color: white; }
.house-card:hover { transform: translateY(-5px); box-shadow: 0 12px 24px rgba(0,0,0,0.25); }
.house-title { font-weight: 800; color: #ffffff; font-size: 1.2rem; display: block; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1px; text-shadow: 0 2px 2px rgba(0,0,0,0.1); }
.house-stat { font-size: 2.5rem; font-weight: 800; color: #ffffff; display: block; line-height: 1.1; text-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.caretaker-badge { display: inline-block; background: rgba(255, 255, 255, 0.2); border-radius: 15px; padding: 2px 10px; font-size: 0.85rem; margin-top: 5px; color: white; border: 1px solid rgba(255,255,255,0.3); }

/* --- CALENDAR TEXT COLOR FIXES --- */
.fc-event { cursor: pointer; border: 1px solid #ccc !important; margin-bottom: 2px; box-shadow: 0 2px 4px rgba(168, 155, 155, 0.05); white-space: normal !important; height: auto !important; padding: 2px; }
.fc-event-main, .fc-event-title { color: inherit !important; font-weight: 700 !important; text-shadow: none !important; }
.event-sale { background-color: #ffffff !important; border-left: 5px solid #15803d !important; color: #000000 !important; }
.event-scheduled { background-color: #dcfce7 !important; border: 2px dashed #16a34a !important; color: #14532d !important; }
.event-cancelled { background-color: #fee2e2 !important; border: 2px solid #ef4444 !important; color: #991b1b !important; text-decoration: line-through; opacity: 0.7; }

.fc-day-other { visibility: hidden !important; }
.history-table th, .inventory-table th { background-color: #14532d; color: white; }
.history-table tr:hover { background-color: #f0fdf4; }
.search-row:hover { background-color: #dcfce7 !important; cursor: pointer; }
#saveToast { visibility: hidden; min-width: 250px; background-color: #15803d; color: #fff; text-align: center; border-radius: 4px; padding: 16px; position: fixed; z-index: 9999; right: 30px; top: 30px; font-weight: bold; }
#saveToast.show { visibility: visible; animation: fadein 0.5s, fadeout 0.5s 2.5s; }
@keyframes fadein { from {top: 0; opacity: 0;} to {top: 30px; opacity: 1;} }
@keyframes fadeout { from {top: 30px; opacity: 1;} to {top: 0; opacity: 0;} }
.action-btn-group { position: fixed; bottom: 30px; right: 30px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }
.fab { width: 60px; height: 60px; border-radius: 50%; box-shadow: 0 4px 8px rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; border: none; color: white; transition: 0.3s; }
.fab:hover { transform: scale(1.1); }
.fab-green { background-color: #16a34a; } .fab-gold { background-color: #d97706; } .fab-blue { background-color: #4f46e5; }
.sync-indicator { font-size: 0.8rem; display:block !important; font-weight: bold; transition: all 0.5s; }
.sync-online { color: #4ade80; animation: pulse 2s infinite; }
.sync-offline { color: #fbbf24; }
.sync-saving { color: #60a5fa; }
@keyframes pulse { 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } }

/* NOTIFICATION STYLES */
.notification-badge { position: absolute; top: 0; right: 0; transform: translate(50%, -50%); background-color: #dc3545; color: white; border-radius: 50%; padding: 2px 6px; font-size: 0.7rem; font-weight: bold; display: none; }
.notification-item { border-bottom: 1px solid #eee; padding: 10px; font-size: 0.9rem; white-space: normal; cursor: pointer; transition: background 0.2s; }
.notification-item:hover { background-color: #e6fffa; }
.notification-item small { display: block; color: #888; margin-top: 3px; }
.notif-unread { background-color: #f0fdf4; border-left: 3px solid #15803d; }

/* CHAT SYSTEM */
.fc-col-header-cell-cushion { color: #14532d !important; text-decoration: none !important; font-weight: 800 !important; text-transform: uppercase; padding: 10px 0 !important; }
.fc-daygrid-day-number { color: #14532d !important; text-decoration: none !important; font-weight: bold !important; font-size: 1.1rem; margin: 5px !important; }
.fc-toolbar-title { font-weight: 900 !important; color: #14532d !important; text-transform: uppercase; }
.fc-button-primary { background-color: #14532d !important; border-color: #14532d !important; }

#chatFab { position: fixed; bottom: 30px; left: 30px; z-index: 1001; }
.chat-box { position: fixed; bottom: 100px; left: 30px; width: 450px; height: 500px; background: white; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.2); z-index: 1002; display: flex; flex-direction: column; overflow: hidden; }
.chat-header { background: #14532d; color: white; padding: 10px 15px; display: flex; justify-content: space-between; align-items: center; font-weight: bold; }
.chat-container { display: flex; flex: 1; overflow: hidden; }
.chat-sidebar { width: 130px; background: #f1f5f9; border-right: 1px solid #ddd; overflow-y: auto; display: flex; flex-direction: column; }
.chat-main { flex: 1; display: flex; flex-direction: column; background: #f8f9fa; }
.chat-body { flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.chat-footer { padding: 10px; border-top: 1px solid #ddd; background: white; display: flex; flex-direction: column; gap: 5px; }

.contact-item { padding: 15px 10px; cursor: pointer; border-bottom: 1px solid #e2e8f0; font-size: 0.85rem; position: relative; transition: background 0.2s; }
.contact-item:hover { background: #e2e8f0; }
.contact-item.active { background: #ffffff; border-left: 4px solid #15803d; font-weight: bold; color: #14532d; }

.message-bubble { max-width: 85%; padding: 8px 12px; border-radius: 15px; font-size: 0.9rem; position: relative; word-wrap: break-word; }
.message-me { background: #dcfce7; align-self: flex-end; border-bottom-right-radius: 2px; border: 1px solid #bbf7d0; color: #14532d; }
.message-them { background: #e9ecef; align-self: flex-start; border-bottom-left-radius: 2px; border: 1px solid #dee2e6; color: #333; }
.message-meta { font-size: 0.65rem; color: #666; margin-top: 2px; display: block; text-align: right; }
.chat-badge { position: absolute; top: 0; right: 0; transform: translate(30%, -30%); background-color: #dc3545; color: white; border-radius: 50%; padding: 3px 7px; font-size: 0.75rem; display: none; border: 2px solid white; }
.chat-date-divider { text-align: center; margin: 10px 0; font-size: 0.75rem; color: #888; display: flex; align-items: center; justify-content: center; }
.chat-date-divider span { background: #f0f0f0; padding: 2px 10px; border-radius: 10px; }

/* Refine Status Pill for vertical display */
#userStatusListVertical .status-pill {
    width: 100%; /* Make them fill the container */
    justify-content: flex-start; /* Align text to the left */
    margin-right: 0; /* Remove horizontal spacing */
    padding: 5px 8px; /* Reduced vertical padding */
    font-size: 0.85rem; /* Slightly smaller font */
}

.status-pill { display: flex; align-items: center; gap: 5px; font-weight: 600; background: #f8f9fa; border-radius: 20px; border: 1px solid #eee; }
.status-dot { height: 8px; width: 8px; background-color: #bbb; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 2px rgba(255,255,255,1); transition: background-color 0.3s; }
.status-online { background-color: #22c55e; box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2); }
.status-offline { background-color: #d1d5db; }