.fm63-wrapper, 
.fm63-wrapper * {
    box-sizing: border-box;
}

.fm63-wrapper {
    font-family: Arial, sans-serif !important;
    font-size: 12px !important;
    color: #e1e1e1 !important;
    background-color: #242424 !important;
    border: 1px solid #444444 !important;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.7);
    padding: 20px;
    margin-bottom: 20px;
    width: 100%;
}

.fm63-wrapper h1, 
.fm63-wrapper h2, 
.fm63-wrapper h3, 
.fm63-wrapper label, 
.fm63-wrapper p, 
.fm63-wrapper span, 
.fm63-wrapper th, 
.fm63-wrapper td {
    color: #e1e1e1 !important;
    font-family: Arial, sans-serif !important;
}

.fm63-card {
    background-color: #2c2c2c !important;
    border: 1px solid #555555 !important;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.fm63-wrapper input[type='text'], 
.fm63-wrapper input[type='email'], 
.fm63-wrapper input[type='password'], 
.fm63-wrapper input[type='date'], 
.fm63-wrapper input[type='time'], 
.fm63-wrapper select, 
.fm63-wrapper textarea {
    background-color: #3b3b3b !important;
    color: #e1e1e1 !important;
    border: 1px solid #666666 !important;
    border-radius: 4px;
    font-family: Arial, sans-serif !important;
    font-size: 12px !important;
    padding: 8px 10px;
    width: 100%;
}

.fm63-wrapper input[type='checkbox'] {
    background-color: #3b3b3b !important;
    border: 1px solid #666666 !important;
    width: 14px !important;
    height: 14px !important;
    cursor: pointer;
    vertical-align: middle;
}

.fm63-wrapper button, 
.fm63-wrapper .button, 
.fm63-wrapper input[type='submit'] {
    background-color: #444444 !important;
    color: #e1e1e1 !important;
    border: 1px solid #666666 !important;
    border-radius: 4px;
    padding: 8px 14px;
    font-size: 12px !important;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.fm63-wrapper button:hover, 
.fm63-wrapper .button:hover, 
.fm63-wrapper input[type='submit']:hover {
    background-color: #555555 !important;
    color: #ffffff !important;
}

.fm63-mandant-btn {
    background-color: #3b3b3b !important;
    color: #e1e1e1 !important;
    border: 1px solid #666666 !important;
    margin-right: 5px;
}

.fm63-mandant-btn.active {
    background-color: #555555 !important;
    color: #ffffff !important;
    border-color: #aaaaaa !important;
    font-weight: bold;
}

.fm63-cal-grid {
    display: grid;
    grid-template-columns: 80px repeat(5, 1fr);
    gap: 1px;
    background-color: #555555;
    border: 1px solid #555555;
    margin-top: 15px;
    overflow-x: auto;
}

.fm63-cal-cell {
    background-color: #2c2c2c;
    padding: 8px;
    min-height: 50px;
    color: #e1e1e1;
    font-size: 12px;
}

.fm63-time-slot {
    cursor: pointer;
    transition: background-color 0.1s ease;
}

.fm63-time-slot:hover {
    background-color: #363636 !important;
}

.fm63-cal-header {
    background-color: #353535;
    font-weight: bold;
    text-align: center;
}

.fm63-cal-time {
    background-color: #303030;
    text-align: right;
    padding-right: 10px;
    font-weight: bold;
    color: #aaaaaa;
}

.fm63-event-box {
    background-color: #444444;
    color: #ffffff;
    padding: 4px 6px;
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 11px;
    border: 1px solid #666666;
    cursor: grab;
}
.fm63-event-box:active {
    cursor: grabbing;
}

.fm63-flex-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.fm63-form-table {
    width: 100%;
    border: none;
}

.fm63-form-cell {
    border: none;
    padding: 5px;
}

.fm63-flex-1 {
    flex: 1;
}

.fm63-mt-10 {
    margin-top: 10px;
}

.fm63-text-muted {
    color: #aaaaaa;
}

.fm63-delete-link {
    color: #ffcccc;
    text-decoration: underline;
}

.fm63-action-delete {
    color: #ff8080;
    font-weight: bold;
}

/* Modal Popup Overlay */
.fm63-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
}
.fm63-modal-content {
    width: 100%;
    max-width: 500px;
    background: #2c2c2c !important;
    border: 1px solid #666666 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.9);
}

/* Gray-Select Styling */
.gray-select-wrapper {
    position: relative;
    width: 100%;
}
.gray-select-wrapper > select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.gray-select-button {
    width: 100%;
    min-height: 32px;
    padding: 6px 32px 6px 10px;
    background: #3b3b3b;
    color: #e1e1e1;
    border: 1px solid #666666;
    border-radius: 4px;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}
.gray-select-menu {
    display: none;
    position: absolute;
    z-index: 99999;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    padding: 4px;
    background: #2c2c2c;
    border: 1px solid #555555;
    border-radius: 6px;
    max-height: 220px;
    overflow-y: auto;
}
.gray-select-wrapper.is-open .gray-select-menu {
    display: block;
}
.gray-select-option {
    padding: 8px 10px;
    border-radius: 4px;
    color: #e1e1e1;
    cursor: pointer;
}
.gray-select-option:hover, .gray-select-option.is-highlighted {
    background: #444444;
    color: #ffffff;
}

/* Tablet Optimizations */
@media (max-width: 768px) {
    .fm63-cal-grid {
        grid-template-columns: 60px repeat(5, 1fr);
        font-size: 10px;
    }
    .fm63-wrapper {
        padding: 10px;
    }
}