/* Custom Admin Styles for Med Ocupacional */
/* Main color palette: #649e5d (primary), #1b4d40 (action buttons), #fff (text on primary) */

/* Header styling */
#header {
    background-color: #649e5d !important;
    color: #fff !important;
}

#header a:link, #header a:visited {
    color: #fff !important;
}

#branding h1, #branding h1 a:link, #branding h1 a:visited {
    color: #fff !important;
}

#user-tools a {
    color: #fff !important;
}

svg {
    color: #649e5d !important;
}

.help {
    font-size: 12px !important;
}

/* Breadcrumbs */
.breadcrumbs {
    background-color: #649e5d !important;
    color: #fff !important;
}

.breadcrumbs a {
    color: #fff !important;
}

/* Module headers */
.module h2, .module caption, .inline-group h2 {
    background-color: #649e5d !important;
    color: #fff !important;
}

/* Button styling */
.default, input[type="submit"].default, .submit-row input.default {
    background: #1b4d40 !important;
    border-color: #1b4d40 !important;
    color: #fff !important;
}

.button, input[type="submit"], input[type="button"], .submit-row input, a.button {
    background: #1b4d40 !important;
    border-color: #1b4d40 !important;
    color: #fff !important;
}

.button:active, input[type="submit"]:active, input[type="button"]:active, .button:focus, input[type="submit"]:focus, input[type="button"]:focus {
    background: #155138 !important;
    border-color: #155138 !important;
}

.button:hover, input[type="submit"]:hover, input[type="button"]:hover {
    background: #155138 !important;
    border-color: #155138 !important;
}

/* Object tools (add, change buttons) */
.object-tools a:link, .object-tools a:visited {
    background-color: #1b4d40 !important;
    color: #fff !important;
    border-radius: 4px !important;
}

.object-tools a:hover, .object-tools a:focus {
    background-color: #155138 !important;
}

/* Admin extra buttons customization */
.object-tools li a.aeb-green {
    background-color: #649e5d !important;
    color: #fff !important;
}

.object-tools li a.aeb-warn {
    background-color: #f0ad4e !important;
    color: #fff !important;
}

.object-tools li a.aeb-danger {
    background-color: #d9534f !important;
    color: #fff !important;
}

.object-tools li a.aeb-error {
    background-color: #c9302c !important;
    color: #fff !important;
}

.object-tools li a.aeb-info {
    background-color: #5bc0de !important;
    color: #fff !important;
}

.object-tools li a.aeb-primary {
    background-color: #1b4d40 !important;
    color: #fff !important;
}

.object-tools li a.disabled {
    background: #ece8e8 !important;
    cursor: not-allowed !important;
    color: #adacac !important;
}

/* Related widget lookups */
.related-widget-wrapper-link {
    color: #fff !important;
}

/* Selector box styling */
.selector h2 {
    background-color: #649e5d !important;
    color: #fff !important;
}

/* Calendar and time picker */
.calendar caption, .calendarbox h2 {
    background-color: #649e5d !important;
    color: #fff !important;
}

.calendar th {
    background-color: #649e5d !important;
    color: #fff !important;
}

/* Pagination */
.paginator a:link, .paginator a:visited {
    background-color: #649e5d !important;
    color: #fff !important;
    border: 1px solid #649e5d !important;
}

.paginator a:hover {
    background: #1b4d40 !important;
    border-color: #1b4d40 !important;
}

.paginator .this-page {
    background: #1b4d40 !important;
    color: #fff !important;
    border: 1px solid #1b4d40 !important;
}

/* Change list actions */
.actions select {
    border: 1px solid #649e5d !important;
}

.actions .button {
    background: #1b4d40 !important;
    border-color: #1b4d40 !important;
}

/* Fieldset styling */
.collapse.collapsed h2 {
    background-color: #649e5d !important;
    color: #fff !important;
}

/* Success messages */
.messagelist .success {
    background-color: #649e5d !important;
    color: #fff !important;
}

/* Custom styling for better UX */
.admin-title {
    background-color: #649e5d !important;
    color: #fff !important;
    padding: 10px 15px !important;
    border-radius: 4px !important;
    margin-bottom: 10px !important;
}

/* Related entity preview styling */
.related-entity-preview {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px 12px;
    margin: 5px 0;
    font-size: 12px;
    color: #495057;
    display: inline-block;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-entity-preview:hover {
    background: #e9ecef;
    cursor: pointer;
}

/* Table row highlighting */
/* #result_list tbody tr:hover {
    background: #f1f8f0 !important;
} */

/* Form field focus */
input:focus, textarea:focus, select:focus {
    border-color: #649e5d !important;
    box-shadow: 0 0 0 2px rgba(100, 158, 93, 0.2) !important;
}

/* Dashboard modules */
.dashboard .module table th {
    color: #fff !important;
}
.dashboard .module table th a {
    color: #649e5d !important;
}

.dashboard .module table td a {
    color: #649e5d !important;
}

/* Change list */
/* .change-list .module table th {
    color: un !important;
} */
.change-list .module table th a {
    color: #649e5d !important;
}

.change-list .module table td a {
    color: #649e5d !important;
}

/* Change form */
.change-form .module table th {
    color: #fff !important;
}
.change-form .module table th a {
    color: #649e5d !important;
}
.change-form .module table td a {
    color: #649e5d !important;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: #fff;
    font-size: 18px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .object-tools {
        float: none !important;
        margin-bottom: 15px !important;
    }

    .object-tools li {
        display: block !important;
        margin-bottom: 5px !important;
    }

    .related-entity-preview {
        max-width: 100%;
        display: block;
    }
}
