/* ============================================
   ESTILOS CUSTOM - sapns App
   Solo estilos que no cubre Bootstrap 5
   ============================================ */

/* Variables CSS para theme */
:root {
    --sp-primary: #0d6efd;
    --sp-secondary: #6c757d;
    --sp-sidebar-width: 240px;
    --sp-header-height: 56px;
}

/* ========== LAYOUT CUSTOM ========== */

/* Sidebar - estilos ahora en sidebar.html */

/* Menubar */
#menubar {
    min-height: 50px;
}

#menubar .nav-link {
    color: #495057;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

#menubar .nav-link:hover {
    background-color: #f8f9fa;
    color: var(--sp-primary);
}

#menubar .navbar-nav {
    flex-wrap: wrap;
}

#menubar .dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
}

/* Main content */
main {
    min-height: calc(100vh - var(--sp-header-height));
}

/* ========== UTILIDADES CUSTOM ========== */

/* Responsive */
@media (max-width: 767.98px) {
    /* Sidebar responsive ahora en sidebar.html */
}

/* ========== LEGACY - Compatibilidad ========== */

/* Body y textos base */
html {
    background: #ffffff;
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Montserrat, sans-serif;
}

body {
    margin: 0 auto;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: Montserrat, sans-serif;
}

a {
    color: #1e3a4d;
    text-decoration: none;
}

h2 {
    color: #666;
    font-size: 1.8em;
    overflow: hidden;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 2px;
}

h4, .h4 {
    font-size: 1.2em;
}

/* Wrappers legacy */
.wrapper {
    margin: 0 auto;
    padding: 0;
    min-height: 91%;
}

.wrapper_full_screen {
    margin: 0 auto;
    padding: 0;
    min-height: 91%;
}

/* Header legacy */
.sp_header {
    position: relative;
    margin: 0 auto;
    z-index: 200;
    float: left;
    width: 100%;
}

.sp_header ul.dropdown-menu {
    position: absolute;
    opacity: 1;
}

.sp_header_top {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 30px;
    background-color: #1e3a4d;
    color: white;
    z-index: 1000;
}

/* Footer */
.sp-footer-separator {
    clear: both;
    height: 10px;
    float: left;
}

.sp-footer {
    position: relative;
    height: 85px;
    padding: 0;
    border-top: 1px solid #ccc;
    background: #eee;
    bottom: 0px;
    float: left;
    width: 100%;
}

.sp-footer-menu {
    float: right;
    padding-top: 10px;
}

.sp-footer-content {
    height: 60px;
    padding: 10px;
    width: 100%;
    margin: 0 auto;
}

/* Shortcuts sidebar */
.text_sb {
    font-size: 13px;
    padding-top: 3px;
    margin-left: 5px;
    float: left;
    width: 130px;
    margin-bottom: 3px;
}

.text_sb,
.subaction {
    padding: 3px;
    cursor: pointer;
    width: 150px;
    transition-duration: 0.3s;
}

.text_sb:hover,
.subaction:hover {
    background-color: #1e3a4d;
    border-radius: 3px;
}

.text_sb a {
    font-weight: bold;
    color: #333;
}

.text_sb a:hover {
    color: black;
}

.subactions {
    clear: left;
    min-height: 22px;
    background-color: #f1f4dc;
    padding: 2px;
    border-radius: 2px;
}

.subactions .item {
    margin-left: 15px;
}

.subactions ul {
    margin-top: 0;
    margin-bottom: 0;
    list-style-type: none;
}

/* User menu legacy */
#sp-user-menu {
    width: 330px;
    display: none;
    margin-top: 5px;
    padding-bottom: 5px;
}

.sp-user-option {
    padding: 2px 2px 2px 10px;
    color: #000;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 1px;
    width: 99%;
    transition: background-color 0.3s;
}

.sp-user-option:hover {
    background-color: #ffa900;
    color: #fff;
}

.sp-user-option img {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

/* Logout legacy */
.sp-logout-user {
    padding-left: 10px;
    float: left;
    font-style: italic;
    font-size: 13px;
    width: 240px;
    height: 18px;
    opacity: 1;
    border-radius: 10px;
    font-weight: normal;
    transition: background-color 0.5s;
}

.sp-logout-user:hover {
    background-color: #ecefcc;
    font-weight: bold;
}

.sp-logout-user * {
    float: left;
    height: 16px;
}

.sp-logout-user img {
    width: 16px;
    margin-top: 1px;
    margin-right: 5px;
}

.sp-logout-user .user-name {
    margin-top: 2px;
    color: #444;
}

/* Field rows */
.sp-field-row {
    clear: left;
    height: 38px;
    margin-bottom: 5px;
}

.sp-field-row .sp-field {
    float: left;
    margin-right: 5px;
}

.sp-field .label.required {
    font-weight: bold;
}

/* Select custom */
.ui-multiselect {
    border: 1px solid #6C7A89;
    border-radius: 0px;
    background: #fff;
    color: #333;
    font-size: 14px;
    padding: 6px 3px !important;
    height: 26px;
}

/* Selector */
.selector {
    width: 100%;
}

.sp-select-text.loading {
    background: #eee url('/images/sapns/loading.gif') no-repeat right center;
    background-size: contain;
}

.sp-select-button {
    float: left;
    cursor: pointer;
    margin-top: 0px;
    font-size: 16px;
    cursor: pointer;
    margin-left: -30px;
    color: #fff;
    border: none;
    background: none;
    padding: 0;
    min-width: 15px;
    background-color: #1e3a4d;
    padding-top: 6px;
    height: 28px;
    margin-top: 1px;
    padding: 5px 0px 0px 2px;
    position: relative;
    right: 0;
    z-index: 1000;
}

/* Course/curso styles */
.curso {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: #495057;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.curso:hover {
    background-color: #1e3a4d;
    color: #fff;
}

.curso i {
    color: #fff;
}

.curso * {
    float: left;
}

.curso img {
    width: 20px;
    height: 20px;
}

.curso .nombre {
    margin-left: 3px;
    font-size: 14px;
    padding: 2px;
    width: 100%;
}

.curso .nombre i {
    padding-top: 2px;
    margin-right: 5px;
}

.curso_seleccionado {
    background-color: rgba(13, 110, 253, 0.15) !important;
    border-left: 3px solid #0d6efd;
    color: #0d6efd !important;
}

/* Inline actions */
.inline_color_delete {
    color: rgb(202, 59, 59);
}

.inline_actions .inline_color_delete {
    color: transparent;
}

.inline_actions {
    float: left;
    margin-left: 28px;
    color: #1e3a4d;
    color: transparent;
    clear: left;
}

.sp-grid-row:hover .inline_actions .inline_color_delete {
    color: rgb(202, 59, 59);
}

.sp-grid-row:hover .inline_actions,
.sp-grid-row:hover .inline_actions a {
    color: inherit;
}

.sp-grid-row a.inline_action {
    cursor: pointer;
    font-size: 12px;
    color: transparent;
}

.inline_action {
    cursor: pointer;
    font-size: 12px;
}

.inline_action:hover,
.sp-grid-row a.inline_action:hover {
    color: #565823;
}

.inline_action i {
    margin: 0 5px;
}

/* Export styles */
.export-separator {
    clear: left;
}

.export-label {
    border-radius: 4px;
    padding: 4px;
    margin-bottom: 2px;
    height: 20px;
    width: 155px;
    font: 13px arial;
    text-align: center;
    cursor: default;
    float: left;
    margin-right: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.export-label.selected {
    background-color: #ecefcc;
    font-weight: bold;
}

.export-label.selected:hover {
    color: #1e3a4d;
}

.export-label.unselected {
    background-color: #d5d5d5;
    color: #777;
}

/* Delete dialog */
#sp-delete-dialog .question {
    font-size: 20px;
    padding: 10px;
}

#sp-delete-dialog .title {
    overflow: auto;
    height: 120px;
    padding: 5px;
    background-color: #eee;
    border-radius: 5px;
}

#sp-delete-dialog .error-message div.error-title {
    color: #e00000;
    font-size: 18px;
    font-weight: bold;
    padding: 10px;
}

#sp-delete-dialog .error-message .related-classes {
    height: 105px;
    overflow: auto;
    padding: 5px;
    background-color: #eee;
    margin-top: 10px;
}

#sp-delete-dialog .error-message .related-classes .rc {
    float: left;
    color: #fff;
    background-color: #444;
    border-radius: 5px;
    margin-right: 5px;
    margin-bottom: 5px;
    padding: 2px 5px;
    min-width: 90px;
    text-align: center;
    cursor: default;
    font-size: 13px;
}

/* Labels */
.label {
    display: inline;
    padding: 0.2em 0.6em 0.3em;
    font-size: 75%;
    font-weight: bold;
    line-height: 1;
    color: #222;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25em;
}

/* Spacing utilities custom */
.top40 { margin-top: 40px; }
.top30 { margin-top: 30px; }
.top20 { margin-top: 20px; }
.top10 { margin-top: 10px; }
.top5 { margin-top: 5px; }

.negrita { font-weight: bold; }
.bbottom_dotted { border-bottom: 1px dotted #ccc; }
.padding_5 { padding: 5px; }

.align-middle {
    vertical-align: middle !important;
    padding-top: 20px;
    float: left;
    width: 100%;
}

/* jQuery UI overrides */
.ui-dialog {
    box-shadow: 1px 1px 7px #444;
    overflow-y: scroll !important;
}

.ui-widget {
    font-size: 14px;
    font-family: inherit;
}

.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year {
    color: #666;
}

/* Language selector */
#sp-language-selector {
    font-size: 9px;
}

#sp-language-selector-out {
    float: right;
    margin: 5px 5px 0 0;
}

/* App title */
.sp_app_title {
    position: absolute;
    left: 0px;
    top: 5px;
    font-size: 15px;
    text-align: left;
    margin-left: 10px;
    color: #FFB835;
}

.sp_app_title_sep {
    color: #000;
    font-weight: bold;
}

.sp_app_subtitle {
    font-size: 12px;
    text-align: left;
    color: #723532;
}

/* Checkbox */
.sp-checkbox-big {
    height: 25px;
    width: 25px;
}

/* Messages */
.sp_messages {
    font-size: 10px;
    color: navy;
}

/* Sidebar messages */
.sidebar-messages {
    position: fixed;
    right: 10px;
    top: 20px;
    width: 200px;
    padding: 5px;
    z-index: 100000;
}

.sidebar-messages .sbm-message {
    position: relative;
    padding: 8px;
    border-radius: 10px;
    box-shadow: 2px 2px #999;
    min-height: 50px;
    opacity: 0.7;
    margin-bottom: 5px;
}

.sbm-message-std {
    background-color: #ffb328;
    font: bold 13px arial;
}

/* No shortcuts */
.sp-no-shortcuts {
    font: 20px arial;
    color: #999;
    text-align: left;
}

.sp-no-shortcuts span.subtitle {
    font: 15px arial;
}

.sp-no-shortcuts span.here {
    font-weight: bold;
    cursor: pointer;
}

/* Error */
.sp-field-error {
    color: red;
}

/* Input focus */
input[type=text]:focus,
input[type=password]:focus,
textarea:focus {
    border-color: #797C33;
}

/* Bloque */
.bloque {
    border: 2px solid #1e3a4d;
    background-color: #d9edf714 !important;
    color: #35b5b4;
    border-radius: 4px;
}

/* Center */
.sp_center {
    position: absolute;
    width: 997px;
    height: 600px;
    left: 200px;
    top: 0px;
    border: 1px solid #eee;
    border-radius: 0 0 10px 0;
}

.sp_center.no-sidebar {
    border-radius: 0 0 10px 10px;
}

/* Login form legacy */
#wrong-login {
    width: 410px;
    margin: 25px auto;
    height: 32px;
    background-color: #fee1ad;
    border-radius: 3px;
    padding: 6px 5px 5px 5px;
    font: 14px arial;
    color: #444;
    text-align: center;
}

#wrong-login span {
    font-weight: bold;
}

#forgot_password {
    text-align: center;
}

#forgot_password label {
    font-weight: normal;
    font-size: 11px;
    color: #223f85;
    cursor: pointer;
}

#forgot_password label:hover {
    color: #1e3a4d;
}

/* Item sortable */
.item_sb {
    min-height: 22px;
    width: 100px;
    margin: 0 auto;
}

.item_sb_dragging {
    border: 1px solid #1e3a4d;
    border-radius: 3px;
    height: 25px;
}

.item_sb a {
    font-weight: normal;
}

.item_sb_sortable img {
    width: 18px;
    height: 18px;
}

.icon_sb {
    width: 25px;
    height: 25px;
    cursor: pointer;
    float: left;
}

.return_sb {
    margin-left: 5px;
}

.item_sb .subaction {
    font-weight: normal;
    color: #999;
    font: 11px arial;
    height: 18px;
}

.item_sb .subaction:hover {
    color: black;
}
