:root {
    --ticscloud-navy: var(--brand-dark, #071a3d);
    --ticscloud-blue: var(--brand-primary, #075fc9);
    --ticscloud-cyan: var(--brand-secondary, #00a8e8);
    --ticscloud-light: #f3f7ff;
    --ticscloud-text: #263750;
}

/* Logo del administrador */
.dashboard-system .header .logo-container {
    background: var(--brand-dark, #071a3d);
}

.dashboard-system .ticscloud-admin-logo {
    width: 62px;
    height: 62px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    padding: 5px;
}

/* Navegación del administrador */
.dashboard-system .nav-main li.nav-active > a {
    color: var(--brand-primary, #075fc9) !important;
    box-shadow: 3px 0 0 var(--brand-secondary, #00a8e8) inset !important;
}

.dashboard-system .nav-main li a:hover {
    color: var(--brand-primary, #075fc9) !important;
    background-color: #f3f7ff;
}

/* Encabezados y botones */
.dashboard-system .card-header.bg-info {
    background-color: var(--brand-primary, #075fc9) !important;
    border-color: var(--brand-primary, #075fc9) !important;
}

.dashboard-system .btn-primary,
.dashboard-system .btn-custom,
.dashboard-system .btn-secondary,
.dashboard-system .btn-danger {
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.15s ease,
                border-color 0.15s ease,
                color 0.15s ease,
                box-shadow 0.15s ease;
}

.dashboard-system .btn-primary,
.dashboard-system .btn-custom {
    color: #ffffff !important;
    background-color: var(--brand-primary, #075fc9) !important;
    border-color: var(--brand-primary, #075fc9) !important;
}

.dashboard-system .btn-primary:hover,
.dashboard-system .btn-custom:hover {
    color: #ffffff !important;
    background-color: #054fa9 !important;
    border-color: #054fa9 !important;
}

.dashboard-system .btn-primary:focus,
.dashboard-system .btn-custom:focus {
    color: #ffffff !important;
    background-color: var(--brand-primary, #075fc9) !important;
    border-color: var(--brand-primary, #075fc9) !important;
    box-shadow: 0 0 0 0.2rem rgba(7, 95, 201, 0.25) !important;
}

.dashboard-system .btn-primary:active,
.dashboard-system .btn-custom:active {
    color: #ffffff !important;
    background-color: #04458f !important;
    border-color: #04458f !important;
}

.dashboard-system .btn-secondary {
    color: #ffffff !important;
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}

.dashboard-system .btn-secondary:hover,
.dashboard-system .btn-secondary:focus {
    color: #ffffff !important;
    background-color: #5a6268 !important;
    border-color: #545b62 !important;
}

.dashboard-system .btn-secondary:focus {
    box-shadow: 0 0 0 0.2rem rgba(130, 138, 145, 0.5) !important;
}

.dashboard-system .btn-secondary:active {
    color: #ffffff !important;
    background-color: #545b62 !important;
    border-color: #4e555b !important;
}

.dashboard-system .btn-danger {
    color: #ffffff !important;
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.dashboard-system .btn-danger:hover,
.dashboard-system .btn-danger:focus {
    color: #ffffff !important;
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
}

.dashboard-system .btn-danger:focus {
    box-shadow: 0 0 0 0.2rem rgba(225, 83, 97, 0.5) !important;
}

.dashboard-system .btn-danger:active {
    color: #ffffff !important;
    background-color: #bd2130 !important;
    border-color: #b21f2d !important;
}

.dashboard-system .btn-primary:focus-visible,
.dashboard-system .btn-custom:focus-visible,
.dashboard-system .btn-secondary:focus-visible,
.dashboard-system .btn-danger:focus-visible {
    outline: 2px solid var(--brand-secondary, #00a8e8);
    outline-offset: 2px;
}

.dashboard-system .btn-primary:disabled,
.dashboard-system .btn-primary.disabled,
.dashboard-system .btn-custom:disabled,
.dashboard-system .btn-custom.disabled {
    color: #ffffff !important;
    background-color: var(--brand-primary, #075fc9) !important;
    border-color: var(--brand-primary, #075fc9) !important;
    box-shadow: none !important;
    opacity: 0.65;
}

.dashboard-system .btn-secondary:disabled,
.dashboard-system .btn-secondary.disabled {
    color: #ffffff !important;
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    box-shadow: none !important;
    opacity: 0.65;
}

.dashboard-system .btn-danger:disabled,
.dashboard-system .btn-danger.disabled {
    color: #ffffff !important;
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    box-shadow: none !important;
    opacity: 0.65;
}

/* Formularios HTML del administrador */
.dashboard-system input.form-control:not([type="file"]):not([type="checkbox"]):not([type="radio"]),
.dashboard-system select.form-control:not(.select2-hidden-accessible),
.dashboard-system textarea.form-control {
    border-radius: 8px;
    transition: border-color 0.15s ease,
                box-shadow 0.15s ease,
                background-color 0.15s ease;
}

.dashboard-system input.form-control:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not(.is-invalid),
.dashboard-system select.form-control:not(.select2-hidden-accessible):not(.is-invalid),
.dashboard-system textarea.form-control:not(.is-invalid) {
    background-color: #ffffff;
    border-color: #d7e1ef;
}

.dashboard-system input.form-control:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not(.is-invalid):not(:disabled):not([readonly]):hover,
.dashboard-system select.form-control:not(.select2-hidden-accessible):not(.is-invalid):not(:disabled):not([readonly]):hover,
.dashboard-system textarea.form-control:not(.is-invalid):not(:disabled):not([readonly]):hover {
    border-color: #b8c7da;
}

.dashboard-system input.form-control:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not(.is-invalid):focus,
.dashboard-system select.form-control:not(.select2-hidden-accessible):not(.is-invalid):focus,
.dashboard-system textarea.form-control:not(.is-invalid):focus {
    border-color: var(--brand-primary, #075fc9);
    box-shadow: 0 0 0 3px rgba(7, 95, 201, 0.16);
}

.dashboard-system input.form-control:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not(.is-invalid):disabled,
.dashboard-system select.form-control:not(.select2-hidden-accessible):not(.is-invalid):disabled,
.dashboard-system textarea.form-control:not(.is-invalid):disabled {
    color: #7b8794;
    background-color: #f3f6fa;
    cursor: not-allowed;
}

.dashboard-system input.form-control:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not(.is-invalid)[readonly],
.dashboard-system select.form-control:not(.select2-hidden-accessible):not(.is-invalid)[readonly],
.dashboard-system textarea.form-control:not(.is-invalid)[readonly] {
    color: #495057;
    background-color: #f8fafc;
}

.dashboard-system .was-validated input.form-control:not([type="file"]):not([type="checkbox"]):not([type="radio"]):invalid,
.dashboard-system .was-validated select.form-control:not(.select2-hidden-accessible):invalid,
.dashboard-system .was-validated textarea.form-control:invalid,
.dashboard-system input.form-control:not([type="file"]):not([type="checkbox"]):not([type="radio"]).is-invalid,
.dashboard-system select.form-control:not(.select2-hidden-accessible).is-invalid,
.dashboard-system textarea.form-control.is-invalid {
    border-color: #dc3545;
}

.dashboard-system .was-validated input.form-control:not([type="file"]):not([type="checkbox"]):not([type="radio"]):invalid:focus,
.dashboard-system .was-validated select.form-control:not(.select2-hidden-accessible):invalid:focus,
.dashboard-system .was-validated textarea.form-control:invalid:focus,
.dashboard-system input.form-control:not([type="file"]):not([type="checkbox"]):not([type="radio"]).is-invalid:focus,
.dashboard-system select.form-control:not(.select2-hidden-accessible).is-invalid:focus,
.dashboard-system textarea.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.dashboard-system .text-primary {
    color: var(--brand-primary, #075fc9) !important;
}
/* Tarjeta de versión Ticscloud */
.dashboard-system .ticscloud-version-icon {
    background: linear-gradient(135deg, var(--brand-dark, #071a3d), var(--brand-primary, #075fc9)) !important;
    padding: 8px;
    overflow: hidden;
}

.dashboard-system .ticscloud-version-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Logo del acceso de clientes */
.auth .auth__logo-form {
    width: auto !important;
    max-width: 140px !important;
    max-height: 140px !important;
    object-fit: contain;
    display: block;
    margin: 0 auto 22px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(7, 26, 61, 0.14);
}

/* =========================================================
   Acceso administrativo Ticscloud
   ========================================================= */

.tc-admin-login {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(420px, 1fr);
    background: #ffffff;
}

.tc-admin-login__visual {
    position: relative;
    min-height: 100vh;
    background:
        linear-gradient(
            180deg,
            rgba(6, 24, 58, 0.04),
            rgba(6, 24, 58, 0.28)
        ),
        url("/images/ticscloud-login-bg.png") center center / cover no-repeat;
}

.tc-admin-login__visual-footer {
    position: absolute;
    left: 42px;
    right: 42px;
    bottom: 38px;
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 460px;
    padding: 18px 22px;
    color: #ffffff;
    background: rgba(6, 24, 58, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(10px);
}

.tc-admin-login__visual-footer strong,
.tc-admin-login__visual-footer span {
    display: block;
}

.tc-admin-login__visual-footer strong {
    margin-bottom: 3px;
    font-size: 19px;
}

.tc-admin-login__visual-footer span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

.tc-admin-login__visual-icon {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    height: 48px;
    color: #ffffff !important;
    font-size: 22px !important;
    background: linear-gradient(135deg, var(--brand-primary, #075fc9), var(--brand-secondary, #00a8e8));
    border-radius: 14px;
}

.tc-admin-login__panel {
    min-height: 100vh;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top right, rgba(0, 168, 232, 0.09), transparent 32%),
        #ffffff;
}

.tc-admin-login__card {
    width: 100%;
    max-width: 440px;
}

.tc-admin-login__brand {
    margin-bottom: 32px;
    text-align: center;
}

.tc-admin-login__brand img {
    width: 118px;
    height: 118px;
    padding: 6px;
    object-fit: contain;
    border-radius: 22px;
    box-shadow: 0 14px 38px rgba(7, 95, 201, 0.18);
}

.tc-admin-login__brand span {
    display: block;
    margin-top: 17px;
    color: var(--brand-primary, #075fc9);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.tc-admin-login__heading {
    margin-bottom: 30px;
    text-align: center;
}

.tc-admin-login__heading h1 {
    margin: 0 0 10px;
    color: var(--brand-dark, #071a3d);
    font-size: 31px;
    font-weight: 700;
}

.tc-admin-login__heading p {
    margin: 0;
    color: #71809a;
    font-size: 14px;
}

.tc-admin-login .form-group {
    margin-bottom: 21px;
}

.tc-admin-login .form-group > label {
    margin-bottom: 8px;
    color: #263750;
    font-size: 13px;
    font-weight: 600;
}

.tc-admin-login__input {
    position: relative;
}

.tc-admin-login__input > i {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 17px;
    color: #7d8ca5;
    transform: translateY(-50%);
}

.tc-admin-login__input .form-control {
    height: 54px;
    padding: 10px 16px 10px 48px;
    color: var(--brand-dark, #071a3d);
    background: #f8faff;
    border: 1px solid #dce4f1;
    border-radius: 12px;
    box-shadow: none;
    transition: 0.2s ease;
}

.tc-admin-login__input .form-control:focus {
    background: #ffffff;
    border-color: var(--brand-secondary, #00a8e8);
    box-shadow: 0 0 0 4px rgba(0, 168, 232, 0.11);
}

.tc-admin-login__options {
    margin: 4px 0 24px;
}

.tc-admin-login__button {
    width: 100%;
    min-height: 54px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--brand-primary, #075fc9), var(--brand-secondary, #00a8e8));
    border: 0;
    border-radius: 12px;
    box-shadow: 0 14px 30px rgba(7, 95, 201, 0.25);
    cursor: pointer;
    transition: 0.2s ease;
}

.tc-admin-login__button:hover {
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(7, 95, 201, 0.32);
}

.tc-admin-login__copyright {
    margin: 32px 0 0;
    color: #8a96aa;
    font-size: 12px;
    text-align: center;
}

.tc-admin-login label.error {
    margin-top: 7px;
    color: #dc3545;
    font-size: 12px;
}

@media (max-width: 991px) {
    .tc-admin-login {
        display: block;
        background:
            linear-gradient(rgba(6, 24, 58, 0.82), rgba(6, 24, 58, 0.9)),
            url("/images/ticscloud-login-bg.png") center / cover fixed;
    }

    .tc-admin-login__visual {
        display: none;
    }

    .tc-admin-login__panel {
        min-height: 100vh;
        padding: 28px 18px;
        background: transparent;
    }

    .tc-admin-login__card {
        padding: 30px 24px;
        background: rgba(255, 255, 255, 0.97);
        border-radius: 22px;
        box-shadow: 0 22px 55px rgba(0, 0, 0, 0.24);
    }

    .tc-admin-login__brand img {
        width: 100px;
        height: 100px;
    }

    .tc-admin-login__heading h1 {
        font-size: 26px;
    }

    .tc-admin-login__copyright {
        color: rgba(255, 255, 255, 0.78);
    }
}
