.hide     { display: none }
.show     { display: inline          }
.showrow  { display: table-row-group }
.showcell { display: table-cell }

A.menu               {font-size:14px ; color: white   ; font-family:arial; text-decoration: none }
A.menucurrent        {font-size:14px ; color: cyan    ; font-family:arial; text-decoration: none }
A.menucurrent:hover  {font-size:14px ; color: cyan    ; font-family:arial; text-decoration: none }
A.menu:hover         {font-size:14px ; color: yellow  ; font-family:arial; text-decoration: none }
A                    {font-size:14px ; color: red     ; font-family:arial; text-decoration: none }
A:hover              {font-size:14px ; color: red     ; font-family:arial; text-decoration: underline }
A.smalltext          {font-size:14px ; color: blue    ; font-family:arial; text-decoration: none }
A.smalltext:hover    {font-size:14px ; color: red     ; font-family:arial; text-decoration: underline }

BODY                 {background-color: #BBBBBB; font-size:10px; font-family: Arial, Helvetica, sans-serif;}
TR                   {background-color: white}
TD                   {font-size: 14px; font-family:arial }
TR.menu              {background-color: navy; text-align:center }
TD.menu              {font-family:arial; font-size:14px ; background-color: navy; width:12% }
TD.menucurrent       { font-family:arial; font-size:14px ; background-color: navy; width:12% }
TR.wht               { background-color: #FFFFFF }
TR.pnk               { background-color: #FFCCCC }
TD.pnk               { background-color: #FFCCCC }

/* ========================================================================= */
/* LEGACY LIGHT BLUE OVERRIDES: Forced to IRC Red with White Text            */
/* ========================================================================= */
TR.cyn               { background-color: #CC0000 !important; color: #FFFFFF !important; }
TD.cyn               { background-color: #CC0000 !important; color: #FFFFFF !important; }
TR.cyn A, TD.cyn A   { color: #FFFFFF !important; text-decoration: underline; }

TR.ltblu             { background-color: #CC0000 !important; color: #FFFFFF !important; }
TD.ltblu             { background-color: #CC0000 !important; color: #FFFFFF !important; font-weight: bold; }
TD.ltblu A           { color: #FFFFFF !important; font-weight: bold; text-decoration: underline; }

TR.ltblu A:hover, TD.ltblu A:hover, 
TR.cyn A:hover, TD.cyn A:hover { color: #FFFF00 !important; text-decoration: underline; }

/* ========================================================================= */
/* LEGACY GRAY ROWS                                                          */
/* ========================================================================= */
TR.sep               { background-color: #DDDDDD }
TD.sep               { font-size: 14px; background-color: #DDDDDD; }
TR.row1              { background-color: #FFFFFF;}
TR.row2              { background-color: #DDDDDD;} 
TD.row2              { font-size: 14px; background-color: #DDDDDD; }
TR.row2a             { background-color: #DDDDDD;}
TD.row2a             { font-size: 14px; background-color: #DDDDDD; }
TD.row2help          { background-color: #DDDDDD; }

/* HIGH CONTRAST FIX: Force black links on all gray legacy rows */
TR.row2 A, TD.row2 A,
TR.row2a A, TD.row2a A,
TR.sep A, TD.sep A,
TD.row2help A {
    color: #000000 !important;
}
TR.row2 A:hover, TD.row2 A:hover,
TR.row2a A:hover, TD.row2a A:hover,
TR.sep A:hover, TD.sep A:hover,
TD.row2help A:hover {
    color: #333333 !important;
}

TR.row3              { background-color: #FFFFFF }
TD.row3              { font-size: 14px; background-color: #FFFFFF; }
TD.row3help          { background-color: #FFFFFF }

TD.tabsel            { background-color: #FFFFFF; }
TD.tabunsel          { background-color: #CCCCCC; }

TR.dorg              { background-color: #EEDDAA }
TR.help              { background-color: #EEEEEE }
TD.small             { font-size: 12px; vertical-align: bottom; }
TD.rounded           { border-radius: 25px; padding: 5px; }
INPUT[type=TEXT]     { border-style: solid; border-width: 1px; border-color: black; font-size: 14px; }
INPUT.row1           { color:black; border-style: none; background-color: #DDDDDD; border-width: 0; text-align: center }
INPUT.row1L          { border-style: none; background-color: #DDDDDD; border-width: 0; text-align: left }
INPUT.row2           { border-style: none; background-color: #CCCCCC; border-width: 0; text-align: center }
INPUT.row2L          { border-style: none; background-color: #CCCCCC; border-width: 0; text-align: left }
INPUT.org            { border-style: none; background-color: #FFEEBB; border-width: 0 }
SELECT               { font-size:14px }
SELECT.soft          { font-size:14px ; background-color: #FFEEBB; border: none ; overflow: hidden }
SELECT.redText       { background-color: red; }
OPTION.redText       { background-color: red; }
PRE {
 font-family: monospace;
 overflow-x: auto;
 white-space: pre-wrap;
 white-space: -moz-pre-wrap !important;
 white-space: -pre-wrap;
 white-space: -o-pre-wrap;
 word-wrap: break-word;
}

TR.show   { display: table-row }

TABLE.wh             { background-color: white }
TR.wh                { background-color: white; text-align:center }

INPUT.forceupper     { text-transform: uppercase; }
INPUT.capitalize     { text-transform: capitalize; }

/* Centralized Alert & Redirect Dialog Container */
DIV.alertbox {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    text-align: center;
    background-color: #ffffff;
    color: #000000;
    display: block;
    padding: 20px;
    width: 400px;
    margin: 150px auto 0 auto;
    border-radius: 8px;
    border: 1px solid #666666;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
}

/* Tooltips */
.tooltip { position: relative; display: inline-block; }
.tooltip .tooltiptext {
    visibility: hidden;
    width: 450px;
    background-color: #AABBDD;
    color: #000000;
    text-align: left;
    padding: 3px;
    border-radius: 3px;
    position: absolute;
    top: 30px;
    left: 10px;
    z-index: 1;
}
.tooltip .tooltiptext2 {
    visibility: hidden;
    height: 50px;
    width: 450px;
    background-color: #AABBDD;
    color: #000000;
    text-align: left;
    padding: 3px;
    border-radius: 3px;
    position: absolute;
    top: +30px;
    left: 10px;
    z-index: 1;
}
.tooltip:hover .tooltiptext, .tooltip:hover .tooltiptext2 { visibility: visible; }

/* ========================================================================= */
/* MODERN LOOKUP, MEMDATA & EFCA LAYOUT CARDS (IRC HIGH-CONTRAST THEME)      */
/* ========================================================================= */

.lookup-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    font-family: Arial, Helvetica, sans-serif;
    color: #333333;
}

.noscript-banner {
    background-color: #d9534f;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.admin-header-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.admin-branding {
    text-align: center;
    margin-bottom: 15px;
}

.admin-branding img {
    max-width: 100%;
    height: auto;
}

.admin-title {
    font-size: 18px;
    font-weight: bold;
    color: #111111;
    margin-top: 6px;
}

.admin-subtitle {
    font-size: 14px;
    color: #555555;
    margin-top: 4px;
}

/* Gray Control Bar (#b0b0b0) - Sleek profile and Black Text/Links (#000000) */
.admin-controls-bar {
    width: 100%;
    gap: 15px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background-color: #b0b0b0;
    border-top: 1px solid #999999;
    padding: 2px 2px; 
    font-size: 14px;
    line-height: 1.2;
    color: #000000;
    border-radius: 4px;
}

/* HIGH CONTRAST FIX: Breadcrumbs */
.admin-controls-bar a {
    color: #000000 !important;
    font-weight: bold;
    text-decoration: none;
}

.admin-controls-bar a:hover {
    color: #333333 !important;
    text-decoration: underline;
}

.db-select-label {
    font-weight: bold;
    margin-right: 8px;
    color: #000000;
}

.db-select-dropdown {
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #777;
    background-color: #fff;
    margin-right: 15px;
}

.logout-link {
    color: #000000;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
}

.logout-link:hover {
    color: #333333;
    text-decoration: underline;
}

/* Quick Lookup Container: Now Red with White Text */
.quick-lookup-card {
    background-color: #DD0000;
    border-radius: 6px;
    border: 1px solid black;
    padding: 10px 15px;
    margin-bottom: 0px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
    color: #FFFFFF;
}

.quick-lookup-card label {
    font-weight: bold;
}

.quick-lookup-input {
    text-transform: uppercase;
    padding: 4px 8px;
    border: 1px solid #AA0000;
    border-radius: 4px;
    font-size: 14px;
    background-color: #ffffff;
    color: #000000;
}

/* Standout Button against the Red Background */
.quick-lookup-btn {
    padding: 4px 12px;
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #AA0000;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

.quick-lookup-btn:hover {
    background-color: #f0f0f0;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    cursor: pointer;
}

.admin-footer-card {
    border: 1px solid #DD0000;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 15px;
    text-align: right;
    font-size: 12px;
    color: #666666;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* ========================================================================= */
/* SEARCH TAB & PANEL CONTAINER STYLES                                      */
/* ========================================================================= */

.search-tab-bar {
    display: flex;
    background-color: #b0b0b0;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    margin-top: 0px;
    border: black 1px solid;
    border-bottom: none;
}

.search-tab-item {
    flex: 1;
    text-align: center;
    padding: 12px 20px;
    font-size: 15px; 
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

/* Active Tabs: Now Red with White Text */
.search-tab-item.active-app,
.search-tab-item.active-web {
    background-color: #DD0000;
    color: #FFFFFF;
    border-bottom: none;
}

.search-tab-item.inactive {
    background-color: #b0b0b0;
    color: #000000;
}

.search-tab-item:hover {
    opacity: 0.9;
}

.search-content-card {
    background-color: #ffffff;
    border-radius: 0 0 8px 8px;
    border-left: #DD0000 1px solid;
    border-right: #DD0000 1px solid;
    border-bottom: #DD0000 1px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.search-panel {
    display: block;
    padding: 20px;
    background-color: #ffffff;
}

#SEARCH_APP_PANEL,
#SEARCH_WEB_PANEL {
    background-color: #ffffff;
}

.search-panel.hidden {
    display: none !important;
}

/* ========================================================================= */
/* APP & WEB SEARCH PANEL LAYOUTS                                            */
/* ========================================================================= */

.search-panel-inner {
    width: 100%;
    font-family: Arial, Helvetica, sans-serif;
    color: #111111;
    margin: 0px;
    font-size: 14px;
}

.search-section {
    margin-bottom: 4px;
    padding-bottom: 4px;
    border-bottom: none;
}

.search-section:last-child {
    border-bottom: none;
}

.search-section-title {
    padding-top: 0px;
    font-weight: bold;
    font-size: 16px;
    margin-top: 0px;
    margin-bottom: 4px;
    color: #222222;
}

.search-flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
}

.search-flex-col {
    flex: 1;
    min-width: 220px;
}

.search-flex-col-narrow {
    flex: 0 0 180px;
}

.form-group {
    margin-bottom: 2px;
    display: flex;
    align-items: center;
}

.form-group-vertical {
    margin-bottom: 6px;
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.form-group-vertical a {
    font-size: 14px;
    line-height: 1.3;
    color: #000000;
}

.wdb-input {
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    box-sizing: border-box;
    width: 100%;
}

.wdb-input-inline {
    width: auto !important;
    display: inline-block;
}

.wdb-select {
    padding: 6px;
    border: 1px solid #999;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
}

.wdb-select-multiple {
    height: auto;
    min-height: 250px;
}

.filter-box {
    background-color: #f8f8f8 !important;
    border-radius: 6px;
    border: 1px solid #cccccc !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 15px;
    margin-bottom: 20px;
}

.wdb-btn-submit {
    padding: 6px 14px;
    background-color: #e0e0e0;
    color: #000000;
    border: 1px solid #777777;
    border-radius: 4px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: background-color 0.2s;
}

.wdb-btn-submit:hover {
    background-color: #cccccc;
}

.wdb-helper-text {
    font-size: 12px;
    color: #666666;
    margin-top: 4px;
}

A.view-edit {
    border: 1px solid #000000;
    border-radius: 4px;
    background: #ffffff;
    color: #000000 !important;
    text-decoration: none;
    padding: 2px 6px; 
    font-size: 12px;
    text-align: center;
    margin: auto;
}

A.view-edit:hover {
    background: #f0f0f0;
    color: #000000 !important;
    text-decoration: underline;
}

/* Status Sub-Card Panels */
.status-panel-box {
    flex: 1;
    min-width: 280px;
    background-color: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.status-panel-box table,
.status-panel-box tr,
.status-panel-box td,
.status-panel-box div {
    background-color: transparent !important;
    background: none !important;
}

.status-panel-box input[type="text"] {
    background-color: #ffffff !important;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 3px 6px;
}

.status-panel-box input[type="button"],
.status-panel-box input[type="submit"],
.status-panel-box button {
    background-color: #e0e0e0 !important;
    border: 1px solid #777777;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
}

.status-panel-box input[type="button"]:hover,
.status-panel-box input[type="submit"]:hover,
.status-panel-box button:hover {
    background-color: #cccccc !important;
}

PRE, PRE *, #HISTORY, #HISTORY * {
    font-family: monospace, "Courier New", Courier !important;
    white-space: pre-wrap !important;
    word-break: break-word;
}

A.menulink {
    background: white;
    border-radius: 3px;
    border: 1px solid black;
    text-align: center;
    display: inline-block;
    margin: auto;
    padding: 0px 4px;
    font-size: 12px;
    color: #000000;
}

.coord-app-item {
    transition: background-color 0.15s ease-in-out;
}

.coord-app-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.wdb-summary-container {
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #cccccc;
    box-sizing: border-box;
    margin: 15px auto 8px auto;
    padding: 15px;
    width: 85%; /* Snapped from 100% to exactly match .wdb-grid-container */
}

/* ========================================================================= */
/* PROFILE TEMPLATE OVERRIDES                                                */
/* ========================================================================= */
.header-bar {
    background-color: #CC0000 !important; 
    color: #FFFFFF !important;
    padding: 12px 15px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    border-bottom: 1px solid rgba(0,0,0,0.1);
}
.save-profile-section {
    background-color: #CC0000 !important; 
    color: #FFFFFF !important;
    padding: 15px; 
    border-radius: 6px; 
    text-align: center; 
    margin-top: 10px;
}