/* Custom Modern Design Matched to Your Specific Template Structure */
:root {
    --bg-gradient: linear-gradient(135deg, #0f0e1f 0%, #1f1e40 100%);
    --card-bg: rgba(24, 23, 51, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #f1f1fb;
    --text-muted: #9b9ac2;
    --accent: #5b5fef;
    --accent-hover: #4749d6;
    --input-bg: rgba(15, 14, 31, 0.6);
}

body {
    background: var(--bg-gradient) !important;
    background-image:
        radial-gradient(circle at 15% 10%, rgba(91,95,239,.18), transparent 45%),
        radial-gradient(circle at 85% 90%, rgba(20,184,166,.12), transparent 40%),
        var(--bg-gradient) !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    color: var(--text-main) !important;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

#loginform, #loginform label, #loginform td, #loginform th, #loginform p, #loginform div, #loginform span {
    color: var(--text-main);
}

/* Centova injects its own branding logo inside {$form} — we already show our
   own logo above the card, so hide theirs rather than show both. */
#loginform img[alt="Centova Cast"] {
    display: none !important;
}

/* Captures both the form box and the footer to keep them centered together */
#modern-layout-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

#login-logo {
    max-height: 48px;
    width: auto;
    margin-bottom: 28px;
}

/* Your login form wrapper transformed into a sleek modern card */
#loginform {
    background: var(--card-bg) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2) !important;
    width: 100%;
    max-width: 420px !important;
    padding: 2.5rem !important;
    box-sizing: border-box;
}

/* Ensures the internal table elements generated by Centova scale correctly */
#loginform table {
    width: 100% !important;
    border-collapse: collapse;
}

/* Form Fields Styling */
#loginform input[type="text"], 
#loginform input[type="password"], 
#loginform select {
    width: 100% !important;
    background: var(--input-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    color: var(--text-main) !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    margin-bottom: 1rem !important;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

#loginform input[type="text"]:focus, 
#loginform input[type="password"]:focus {
    border-color: var(--accent) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

/* Submit Button Styling */
#loginform input[type="submit"] {
    width: 100% !important;
    background: var(--accent) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 14px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    margin-top: 0.5rem !important;
}

#loginform input[type="submit"]:hover {
    background: var(--accent-hover) !important;
}

/* Your footer element, now sitting perfectly beneath the box */
#footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
}

#footer a {
    color: var(--accent) !important;
    text-decoration: none !important;
    font-weight: 500;
}

#footer a:hover {
    text-decoration: underline !important;
}

#footer .content {
    color: var(--text-muted) !important;
}
