/* Main Container */
#fm-dashboard {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    max-width: 900px;
    margin: 20px auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 20px;
}

/* Header */
.fm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.fm-header h2 { margin: 0; color: #333; font-size: 1.5rem; }

/* Tabs */
.fm-toolbar { margin-bottom: 20px; }
.fm-tab-btn {
    padding: 10px 20px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-bottom: none;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    border-radius: 5px 5px 0 0;
    margin-right: 5px;
}
.fm-tab-btn.active {
    background: #fff;
    border-bottom: 2px solid #fff;
    color: #007cba;
    margin-bottom: -1px;
    position: relative;
    z-index: 10;
}
.fm-tab-content { display: none; }
.fm-tab-content.active { display: block; }

/* Calendar */
.fm-calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #007cba;
    color: white;
    padding: 10px;
    border-radius: 5px 5px 0 0;
}
.fm-calendar-controls button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
}
.fm-calendar-controls button:hover { background: rgba(255,255,255,0.4); }

.fm-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #ddd;
    border: 1px solid #ddd;
}
.fm-day-cell {
    background: #fff;
    min-height: 100px;
    padding: 5px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}
.fm-day-cell:hover { background: #f0f8ff; }
.fm-day-number { font-weight: bold; font-size: 0.9rem; color: #333; }
.fm-availability {
    display: block;
    margin-top: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
}
.fm-availability.high { color: #28a745; } /* Green */
.fm-availability.med { color: #fd7e14; } /* Orange */
.fm-availability.low { color: #dc3545; } /* Red */

.fm-day-header {
    background: #f1f1f1;
    text-align: center;
    padding: 5px;
    font-weight: bold;
    color: #555;
}

/* Modal */
.fm-modal {
    position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex; justify-content: center; align-items: center;
}
.fm-modal.hidden { display: none; }
.fm-modal-content {
    background-color: #fefefe;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
}
.close-modal {
    position: absolute; right: 15px; top: 10px; font-size: 24px; cursor: pointer; color: #aaa;
}
.close-modal:hover { color: #000; }

/* Forms */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; }
.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Fix width issues */
}
.info-box { background: #e9ecef; padding: 10px; border-radius: 4px; font-size: 0.9em; }
.btn-primary {
    width: 100%;
    padding: 10px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}
.btn-primary:disabled { background: #ccc; cursor: not-allowed; }

/* Table */
.fm-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.fm-table th, .fm-table td { border: 1px solid #eee; padding: 8px; text-align: left; }
.fm-table th { background: #f9f9f9; }
