/* === Dariel brand customizations === */

/* --- Top navbar: replace Mayan logo+text with Dariel --- */
#menu-topbar .navbar-brand {
    font-size: 0 !important;           /* kill text node */
    line-height: 0 !important;
    padding: 5px 15px !important;
    display: inline-flex !important;
    align-items: center !important;
    height: 50px;
}
#menu-topbar .navbar-brand .icon-mayan-edms-logo,
#menu-topbar .navbar-brand > span {
    display: none !important;
}
#menu-topbar .navbar-brand::before {
    content: '';
    display: inline-block;
    width: 140px;
    height: 40px;
    background: url("/static/dariel_brand/logo.3328d51c93f8.png") no-repeat center center;
    background-size: contain;
}

/* --- Login page: hide the giant Mayan banner image --- */
#authentication-login-image-wrapper,
#authentication-login-image-top {
    display: none !important;
}

/* Give the Dariel login logo a dark backdrop so the white artwork shows */
.dariel-login-banner {
    background: #1a1a1a;
    padding: 28px 20px;
    text-align: center;
    border-radius: 6px;
    margin-bottom: 24px;
}
.dariel-login-banner img {
    max-height: 90px;
    max-width: 320px;
    display: inline-block;
}

/* --- Expired / expiring contract highlighting (panel view) --- */
.panel-item.dariel-expired {
    border: 3px solid #d9534f !important;
    box-shadow: 0 0 10px rgba(217, 83, 79, 0.5) !important;
    position: relative;
}
.panel-item.dariel-expired .panel-heading {
    background-color: #d9534f !important;
    border-color: #d43f3a !important;
}
.panel-item.dariel-expired::after {
    content: 'EXPIRED';
    position: absolute;
    top: 8px;
    right: 8px;
    background: #d9534f;
    color: white;
    font-weight: bold;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 10;
}
.panel-item.dariel-expiring-soon {
    border: 3px solid #f0ad4e !important;
    box-shadow: 0 0 10px rgba(240, 173, 78, 0.5) !important;
    position: relative;
}
.panel-item.dariel-expiring-soon::after {
    content: 'EXPIRING SOON';
    position: absolute;
    top: 8px;
    right: 8px;
    background: #f0ad4e;
    color: white;
    font-weight: bold;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 10;
}

/* --- Expired / expiring contract highlighting (table view) --- */
tr.dariel-expired td {
    background-color: #fdf2f2 !important;
    border-left: 4px solid #d9534f !important;
}
tr.dariel-expiring-soon td {
    background-color: #fdf8ee !important;
    border-left: 4px solid #f0ad4e !important;
}

/* --- Contract Search Panel --- */
#dariel-search-panel {
    margin: 10px 15px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.dariel-search-header {
    padding: 10px 15px;
    background: #2c3e50;
    color: #fff;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dariel-search-header:hover {
    background: #34495e;
}
.dariel-search-arrow {
    margin-left: auto;
}
.dariel-search-body {
    padding: 15px;
}
.dariel-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}
.dariel-search-field {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}
.dariel-search-field label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
}
.dariel-search-field select,
.dariel-search-field input[type="date"] {
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    height: 32px;
}
.dariel-search-actions {
    flex-direction: row;
    gap: 6px;
    align-items: flex-end;
}
#dariel-search-results {
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 12px;
}
#dariel-search-summary {
    margin-bottom: 8px;
    font-size: 13px;
    color: #555;
}
.dariel-results-table {
    font-size: 13px;
}
.dariel-results-table th {
    background: #f5f5f5;
    font-size: 12px;
    text-transform: uppercase;
    color: #777;
    border-bottom: 2px solid #ddd !important;
}
.dariel-results-table td {
    vertical-align: middle !important;
}
#dariel-search-loading {
    color: #888;
    padding: 10px 0;
}
