/* ============================================================
   FONT STACK
   ============================================================ */

@font-face {
    font-family: "Supermolot";
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url(fonts/supermolot-Regular-3e0ce038ccecd5f84dcb37aa5aa82c0f.ttf) format("truetype");
}

@font-face {
    font-family: "Supermolot";
    font-style: italic;
    font-weight: 400;
    font-display: block;
    src: url(fonts/supermolot-Italic-0ed716b94d5589980daeb206df9ec895.ttf) format("truetype");
}

/* ============================================================
   CSS CUSTOM PROPERTIES (Design tokens)
   ============================================================ */

:root {
    --blue-deep:    #013256;
    --blue-mid:     #016ebc;
    --blue-light:   #028bee;
    --blue-panel:   #01487e;
    --accent:       #b30054;
    --white:        #ffffff;
    --grey-100:     #f4f6f9;
    --grey-200:     #e8ecf1;
    --grey-500:     #8a95a3;
    --grey-700:     #4a5568;
    --grey-900:     #1a202c;
    --shadow-card:  0 20px 60px rgba(1, 50, 86, 0.12);
    --shadow-input: 0 0 0 3px rgba(1, 110, 188, 0.18);
    --radius-card:  16px;
    --radius-input: 8px;
    --radius-btn:   8px;
    --font-body:    "DM Sans", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-display: "Supermolot", "DM Sans", sans-serif;
    --transition:   0.2s ease;
}

/* ============================================================
   BASE RESET / GLOBAL
   ============================================================ */

html {
    height: 100%;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
    margin: 0;
}

body,
input, select, textarea {
    font-family: var(--font-body);
}

body {
    color: var(--grey-900);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.1;
}

ul {
    padding: 0;
    list-style: none;
}

img {
    border: 0;
}

a:hover, a:active {
    outline: none;
}

h1, h2, h3 {
    font-weight: normal;
    font-size: 1.25em;
    margin: 0.8em 0 0.3em 0;
}

/* ============================================================
   LOGIN PAGE — SPLIT LAYOUT
   ============================================================ */

body.login-body {
    background-color: var(--white);
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

/* Outer split container */
.login-split-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ----------------------------------------------------------
   LEFT PANEL
   ---------------------------------------------------------- */
.login-left-panel {
    position: relative;
    flex: 0 0 45%;
    background: linear-gradient(145deg, var(--blue-deep) 0%, var(--blue-panel) 55%, var(--blue-mid) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 3rem;
}

/* Decorative circles */
.login-deco-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.login-deco-circle--lg {
    width: 520px;
    height: 520px;
    top: -140px;
    right: -160px;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
}

.login-deco-circle--md {
    width: 320px;
    height: 320px;
    bottom: -80px;
    left: -80px;
    background: radial-gradient(circle, rgba(1, 110, 188, 0.25) 0%, transparent 70%);
}

.login-deco-circle--sm {
    width: 160px;
    height: 160px;
    bottom: 15%;
    right: 8%;
    border-color: rgba(255, 255, 255, 0.12);
}

/* Brand block */
.login-brand {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
    max-width: 340px;
    animation: loginFadeUp 0.7s ease both;
}

@keyframes loginFadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.login-logo-img {
    max-width: 500px;
    width: 100%;
    display: block;
    filter: brightness(0) invert(1);  /* makes logo white */
    opacity: 0.95;
}

.login-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.login-brand-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.2vw, 2.8rem);
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.5px;
    line-height: 1.05;
}

.login-brand-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
    max-width: 280px;
}

.login-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 40px;
    padding: 0.4rem 1rem;
    color: rgba(255, 255, 255, 0.80);
    font-size: 0.82rem;
    letter-spacing: 0.3px;
    backdrop-filter: blur(6px);
}

/* ----------------------------------------------------------
   RIGHT PANEL
   ---------------------------------------------------------- */
.login-right-panel {
    flex: 1;
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    position: relative;
}

/* Language selector */
.login-lang-selector {
    position: absolute;
    top: 1.5rem;
    right: 1.75rem;
    z-index: 200;
}

.login-lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--grey-200);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--grey-700);
    background: var(--white);
    user-select: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.login-lang-trigger:hover {
    border-color: var(--blue-mid);
    box-shadow: var(--shadow-input);
    color: var(--blue-mid);
}

.login-lang-chevron {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.login-lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 170px;
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.10);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.login-lang-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.login-lang-dropdown li a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    font-size: 0.88rem;
    color: var(--grey-700) !important;
    text-decoration: none;
    transition: background var(--transition);
}

.login-lang-dropdown li a:hover {
    background: var(--grey-100);
    color: var(--blue-mid) !important;
}

.login-flag {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

/* Card wrapper */
.login-card-wrapper {
    width: 100%;
    max-width: 420px;
    animation: loginFadeUp 0.6s 0.1s ease both;
}

/* Card */
.login-card {
    background: var(--white);
    border-radius: var(--radius-card);
    border: 1px solid var(--grey-200);
    box-shadow: var(--shadow-card);
    padding: 2.5rem 2.25rem;
    margin-bottom: 1.5rem;
}

.login-card-header {
    margin-bottom: 2rem;
}

.login-card-title {
    font-family: var(--font-display);
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: var(--grey-900);
    margin: 0 0 0.35rem !important;
    letter-spacing: -0.4px;
}

.login-card-subtitle {
    font-size: 0.9rem;
    color: var(--grey-500);
    margin: 0;
}

/* Form elements inside login card */
.login-card .form-group,
.login-card .fieldcontain {
    margin-bottom: 1.1rem;
}

.login-card label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--grey-700);
    margin-bottom: 0.35rem;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.login-card input[type="text"],
.login-card input[type="password"],
.login-card input[type="email"] {
    width: 100%;
    padding: 0.72rem 1rem;
    font-size: 0.95rem;
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius-input);
    background: var(--grey-100);
    color: var(--grey-900);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    outline: none;
}

.login-card input[type="text"]:focus,
.login-card input[type="password"]:focus,
.login-card input[type="email"]:focus {
    border-color: var(--blue-mid);
    background: var(--white);
    box-shadow: var(--shadow-input);
}

/* Primary login button */
.login-card .btn-primary,
.login-card input[type="submit"],
.login-card button[type="submit"] {
    display: block;
    width: 100%;
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-body);
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-mid) 0%, var(--blue-deep) 100%);
    border: none;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
    margin-top: 0.5rem;
    letter-spacing: 0.2px;
    box-shadow: 0 4px 14px rgba(1, 110, 188, 0.35);
}

.login-card .btn-primary:hover,
.login-card input[type="submit"]:hover,
.login-card button[type="submit"]:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(1, 110, 188, 0.45);
}

.login-card .btn-primary:active,
.login-card input[type="submit"]:active,
.login-card button[type="submit"]:active {
    transform: translateY(0);
}

/* Error / alert messages inside card */
.login-card .alert,
.login-card .errors,
.login-card .errorMessage {
    background: #fff0f4;
    border: 1px solid #f5c2ce;
    border-left: 3px solid var(--accent);
    color: #8b1a33;
    border-radius: 6px;
    padding: 0.7rem 1rem;
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

/* Footer note below card */
.login-footer-note {
    text-align: center;
    font-size: 0.78rem;
    color: var(--grey-500);
}

/* ----------------------------------------------------------
   RESPONSIVE — collapse to stacked layout on small screens
   ---------------------------------------------------------- */
@media (max-width: 768px) {
    .login-split-layout {
        flex-direction: column;
    }

    .login-left-panel {
        flex: none;
        min-height: 220px;
        padding: 2rem 1.5rem;
        align-items: flex-start;
    }

    .login-brand {
        gap: 1rem;
        max-width: 100%;
    }

    .login-brand-title {
        font-size: 1.75rem;
    }

    .login-brand-subtitle {
        display: none;
    }

    .login-deco-circle--lg { display: none; }
    .login-deco-circle--md { display: none; }

    .login-right-panel {
        padding: 1.5rem 1rem 2rem;
        justify-content: flex-start;
    }

    .login-card-wrapper {
        max-width: 100%;
    }

    .login-lang-selector {
        top: 1rem;
        right: 1rem;
    }
}

/* ============================================================
   GENERAL APP STYLES (non-login, preserved)
   ============================================================ */

#grailsLogo {
    background-color: #feb672;
}

#grailsLogo a {
    display: inline-block;
    margin: 1em;
}

.display-flex {
    display: flex;
}

.menu-bar {
    background-color: var(--blue-mid);
}

ul#nav {
    background-color: var(--blue-mid);
}

ul#nav > li > a {
    background-color: transparent;
}

.menu-bar a {
    color: white !important;
}

.lang-box a {
    color: #333333 !important;
}

.classy-navbar-toggler .navbarToggler span {
    background-color: white;
}

.text-green {
    color: #39c939;
}

@media (min-width: 1024px) {
    .container {
        max-width: calc(95% - 80px) !important;
        margin-left: calc(80px + 2.5%) !important;
        margin-top: 20px;
        padding-top: 70px;
    }

    .license-server {
        padding-left: 100px;
        font-family: Supermolot, sans-serif;
        font-size: 32px;
        color: white;
    }
}

@media (max-width: 1024px) {
    .container {
        max-width: 95% !important;
        margin-left: 2.5% !important;
        margin-right: 2.5% !important;
        margin-top: 20px;
        padding-top: 70px;
    }

    .extractional-logo {
        height: 60px;
        max-width: initial;
    }

    .vertical-logo {
        display: none !important;
    }

    .sidebar {
        display: none !important;
    }

    .license-server {
        display: none;
    }
}

.page-header-title h5 {
    color: white !important;
}

.main-menu .main-menu-header img {
    position: relative;
    max-width: 60px;
    max-height: 60px;
    width: initial;
}

.content h1 {
    border-bottom: 1px solid #CCCCCC;
    margin: 0.8em 1em 0.3em;
    padding: 0 0.25em;
}

.scaffold-list h1 {
    border: none;
}

.footer img {
    height: 80px;
    margin-right: 25px;
    margin-bottom: 15px;
    clear: bottom;
}

.footer strong a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
}

.footer {
    background: #424649;
    color: #ffffff;
    clear: both;
    font-size: 1em;
    margin-top: 1.5em;
    padding: 1em;
    padding-bottom: 2em;
    min-height: 1em;
}

.footer a {
    color: #feb672;
}

.spinner {
    background: url(spinner-c7b3cbb3ec8249a7121b722cdd76b870.gif) 50% 50% no-repeat transparent;
    height: 16px;
    width: 16px;
    padding: 0.5em;
    position: absolute;
    right: 0;
    top: 0;
    text-indent: -9999px;
}

/* Navigation */
.nav { zoom: 1; }
.nav ul { overflow: hidden; padding-left: 0; zoom: 1; }
.nav li { display: block; float: left; list-style-type: none; margin-right: 0.5em; padding: 0; }

.nav a {
    color: #666666;
    display: block;
    padding: 0.25em 0.7em;
    text-decoration: none;
    border-radius: 0.3em;
}

.nav li.dropdown-item a { border-radius: 0; }
.nav a:active, .nav a:visited { color: #666666; }

.nav a:focus, .nav a:hover {
    background-color: #999999;
    color: #ffffff;
    outline: none;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
}

.nav a:focus, .nav a:hover, .nav .active {
    border-bottom: 2px solid var(--accent);
    background-color: transparent;
    color: #333;
    outline: none;
    text-shadow: none;
    border-radius: 0;
}

.nav a.home, .nav a.list, .nav a.create {
    background-position: 0.7em center;
    background-repeat: no-repeat;
    text-indent: 25px;
}

.nav a.home  { background-image: url(skin/house-99bea32e1990e011e870f6c562e87a6a.png); }
.nav a.list  { background-image: url(skin/database_table-c413540d7e3545ace2c445fe686e915f.png); }
.nav a.create { background-image: url(skin/database_add-82a75143b4660a3f02f9c058f0a3ae93.png); }

.nav li.dropdown.show ul.dropdown-menu { background-color: #424649; }
.main-menu .main-menu-content li { background-color: #e1f1ff; }

.warnbox {
    background-color: lightblue;
    border: 1px solid blue;
    padding: 1rem;
}

/* Forms */
fieldset, .property-list {
    margin: 0.6em 1.25em 0 1.25em;
    padding: 0.3em 1.8em 1.25em;
    position: relative;
    zoom: 1;
    border: none;
}

.property-list .fieldcontain { list-style: none; overflow: hidden; zoom: 1; }
.fieldcontain { margin-top: 1em; }

.fieldcontain label, .fieldcontain .property-label {
    color: #666666;
    text-align: right;
    width: 25%;
}

.fieldcontain .property-label { float: left; }
.fieldcontain .property-value { display: block; margin-left: 27%; }

label {
    cursor: pointer;
    display: inline-block;
    margin: 0 0.25em 0 0;
}

input, select, textarea {
    background-color: #fcfcfc;
    border: 1px solid #cccccc;
    font-size: 1em;
    padding: 0.2em 0.4em;
}

select { padding: 0.2em 0.2em 0.2em 0; }
select[multiple] { vertical-align: top; }
textarea { width: 250px; height: 150px; overflow: auto; vertical-align: top; }
input[type=checkbox], input[type=radio] { background-color: transparent; border: 0; padding: 0; }

input:focus, select:focus, textarea:focus {
    background-color: #ffffff;
    border: 1px solid #eeeeee;
    outline: 0;
    box-shadow: 0 0 0.5em #ffffff;
}

.required-indicator {
    color: #cc0000;
    display: inline-block;
    font-weight: bold;
    margin-left: 0.3em;
    position: relative;
    top: 0.1em;
}

ul.one-to-many { display: inline-block; list-style-position: inside; vertical-align: top; }
ul.one-to-many li.add { list-style-type: none; }

fieldset.embedded { background-color: transparent; }

/* Sidebar */
.sidebar {
    width: 80px;
    background-color: #a0a0a0;
    box-shadow: #333333 5px 0 20px;
    z-index: 1000;
    position: fixed;
    height: 100%;
    top: 0;
}

.logo-rotate { transform: rotate(-90deg); z-index: 1001; }

.vertical-logo {
    height: 70px;
    width: 210px;
    position: fixed;
    top: -35px;
    left: -250px;
    max-width: initial;
}

/* Utility */
.pull-right { float: right; }
.pull-left  { float: left; }
.hr-thick   { background-color: black; margin-bottom: 28px; }
.btn-green  { background-color: #1cc9a7; color: white; }
.calendar-icon { border: 1px solid silver; }
.errorMessage { background-color: var(--accent); color: white; font-size: 24px; width: 100%; padding: 15px; text-align: center; }
.invalidFrame { border-left: 3px solid #BF2131; background-color: #f0c0c0; }
.warnbox { background-color: lightblue; border: 1px solid blue; padding: 1rem; }
.clickableTd { cursor: pointer; }
.dataTable tbody tr:hover { background-color: #f0f0f0; }
.connectionRowSelected { background-color: lightblue !important; }
.connectionTable { padding: 0.5rem 0.6rem !important; }
.card-opaque { background-color: white; z-index: 200; }
.bg-extractional { color: white; background-color: var(--blue-mid); }
.bg-c-maroon { background-color: var(--accent); }
.text-green { color: #39c939; }
.code { background-color: #333333; color: #d8d8d8; margin-top: 2em; margin-bottom: 2em; padding-top: 1em; }
.code-highlight { color: #0dcaf0; }
.ul-docs { list-style-type: disc; padding-left: 2em !important; }
xmp { font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

.statNumber { font-size: 48px; padding: 0 !important; width: 25%; vertical-align: middle; text-align: center; }
.statDesc { width: 75%; vertical-align: middle; }

.statCard {
    height: 100px; padding: 20px; display: table-cell;
    vertical-align: middle; box-shadow: #888888 5px 5px 15px;
    border-radius: 6px; width: 1000px;
}

.statCard-blue      { border-left: 5px solid var(--blue-mid); }
.statCard-darkblue  { border-left: 5px solid #0111bc; }
.statCard-red       { border-left: 5px solid var(--accent); }
.statCard-green     { border-left: 5px solid #01bcac; }

.form-group { width: 100%; }

.form-group-default > label {
    background-color: #e0e0e0;
    width: 100%;
    padding-left: 10px;
}

.form-group-default > input,
.input-group > input,
.form-group-default > select {
    width: 100%;
    font-size: 16px;
    padding-top: 8px;
    padding-bottom: 8px;
    height: 42px;
}

.input-lg {
    width: 100% !important;
}

.simple-label { background-color: transparent !important; width: unset !important; }
.input-group-append > select { width: 100%; font-size: 16px; height: 42px; }

.form-group-border { border: 1px solid #c2c2c2; }
.form-group-border-selected { border: 2px solid var(--blue-deep); }
.form-group-border-selected > label { background-color: var(--blue-mid) !important; color: white; }

.navbar li a        { color: white !important; }
.navbar li a:hover  { color: #e6e6e6 !important; }
li.waves-effect a        { color: black !important; }
li.waves-effect a:hover  { color: #444444 !important; }

.flag { width: 40px; height: 30px; margin-left: 20px; }
.menu-flag { width: 30px; height: 22px; }

.dashboard-background {
    position: fixed;
    width: 4000px; height: 1500px;
    border-radius: 50%;
    transform: rotate(10deg);
    top: 85%; left: -500px;
    background-color: rgba(2, 139, 238, 0.1);
    z-index: 1;
}

.nav-pills .nav-link.active,
.nav-pills .show>.nav-link { color: #fff; background-color: #007bff; border-bottom: none; }

.loginMapWindow {
    position: fixed; top: 10%; height: 70%; width: 90%;
    display: none; box-shadow: 5px 40px 140px silver;
    background-color: #e6e6e6;
}

.imageDrop {
    width: 100%; height: 300px;
    background-color: #dddddd;
    border: 4px dashed #909090;
    text-align: center;
}

.form-control { width: 16px; height: 16px; }

.markbox { cursor: pointer; z-index: 1000; }
.markbox:hover { border-bottom: 2px solid blue; }
.marked { position: relative; top: -2px; background-color: rgba(2, 139, 238, 0.5); border-radius: 3px; }
.markcheck-selected { background-color: rgba(188, 1, 110, 0.35); }
.markcheck { font-weight: bold; }
.markcheck_padding { display: inline-block !important; }
.markValidation { background-color: rgba(2, 139, 238, 0.5); }
.markcheck-selected { background-color: rgba(188, 1, 110, 0.35); }

.table-inline-edit {
    font-size: 14px; border: none;
    border-bottom: 1px solid #333333;
    width: 100%; padding: 0;
}

.schemaColAttributes { width: 30% !important; max-width: 35%; }

.btn-sm { padding: 5px 14px; line-height: 16px; font-size: 11px; top: -4px; position: relative; }

.select2-results__option[aria-selected=true]:before {
    font-family: 'FontAwesome6', sans-serif;
    content: "\f00c";
    color: #fff;
    background-color: var(--accent);
    border: 0;
    display: inline-block;
    line-height: 1.2;
    padding: 0 0 0 2px;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--accent);
    border-width: 2px;
}

.select2-dropdown { border: 1px dashed var(--accent) !important; }

.form-group-default .fee { background-color: peachpuff; }

.proofWindowMask {
    position: fixed; z-index: 4999; top: 0; left: 0;
    display: none; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.proofWindow {
    position: absolute; top: -75%; left: 10%;
    width: 80%; height: 90%;
    background-color: white;
    animation: bounce 1.5s;
    animation-fill-mode: both;
    z-index: 5000;
}

@keyframes bounce {
    0%   { opacity: 0; transform: translateY(-2000px); }
    60%  { opacity: 1; transform: translateY(30px); }
    80%  { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

@keyframes slideWinIn {
    0%   { top: -75%; }
    100% { top: 5%; }
}

.proofWindowContent { position: relative; top: 0; left: 0; width: 100%; height: calc(100% - 30px); overflow-y: auto; }
.proofWindowFooter  { left: 0; width: 100%; height: 30px; background-color: var(--accent); color: white; text-align: center; cursor: pointer; }
.proofWindowHeader  { top: 0; height: 30px; text-align: right; padding-right: 10px; }

.verificationBadge {
    position: absolute; right: 10px; top: 5px;
    background-color: white; border-radius: 50px;
    width: 40px; height: 40px; padding-top: 6px;
    text-align: center; font-size: 30px;
}

@media (min-width: 576px) {
    .modal-dialog { max-width: 600px; }
}

.dataTable pre {
    font-family: "Open Sans", HelveticaNeue-Light, "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
}

.scrollBox { overflow: auto; width: 100%; max-height: 400px; max-width: 500px; }

