:root {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-input: #ffffff;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --border-color: #e2e8f0;
    --accent-color: #4299e1;
    --accent-hover: #3182ce;
    --success-color: #48bb78;
    --danger-color: #f56565;
    --warning-color: #ed8936;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}
body.dark-mode {
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --bg-input: #4a5568;
    --text-primary: #f7fafc;
    --text-secondary: #a0aec0;
    --border-color: #4a5568;
    --accent-color: #63b3ed;
    --accent-hover: #4299e1;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.4);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
    min-height: 100vh;
    padding: 20px;
}
.data-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    margin: 5px 0;
    background: var(--bg-secondary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-family: monospace;
}
.data-key { color: var(--text-secondary); font-weight: bold; }
.data-val { color: var(--text-primary); overflow-wrap: break-word; white-space: normal; }
.data-err { color: var(--text-primary); }
.login_registro,
.perfil {
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.perfil {
    max-width:90%;
}
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 600;
}
h2, {
    font-size: 24px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}
h3 {
    font-size: 2em;
    /*! padding-bottom: 15px; */
    border-bottom: 2px solid var(--border-color);
    border-top: 2px solid var(--border-color);
    margin-top: 35px;
}
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="search"],
input[type="file"] {
    width:100%;
    padding:12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}
input[type="file"] {
    width:50%!important;
    display:block;
}
input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

input::placeholder {
    color: var(--text-secondary);
}
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: var(--transition);
}
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}
select {
    width: 50%;
    display:block;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

select:focus {
    outline: none;
    border-color: var(--accent-color);
}
input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: var(--accent-color);
}
button {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    background: var(--accent-color);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin:5px;
}
button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}
button:active {
    transform: translateY(0);
}
button[type="submit"] {
    width: 50%;
    padding: 14px;
    font-size: 16px;
    margin-bottom:15px;
}
button:not([type="submit"]) {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
button:not([type="submit"]):hover {
    background: var(--border-color);
}
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 20px 0;
}
thead {
    background: var(--accent-color);
    color: white;
}
th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 14px;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 250px;
}
tbody tr:hover {
    background: var(--bg-primary);
}
tbody tr:last-child td {
    border-bottom: none;
}
img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}
a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin: 2px;
}
.badge-success { background: rgba(72, 187, 120, 0.2); color: var(--success-color); }
.badge-danger { background: rgba(245, 101, 101, 0.2); color: var(--danger-color); }
.badge-warning { background: rgba(237, 137, 54, 0.2); color: var(--warning-color); }
.badge-info { background: rgba(66, 153, 225, 0.2); color: var(--accent-color);overflow-wrap: break-word;white-space: normal;max-width: 250px;}
.badge-primary { background: rgba(66, 153, 225, 0.2); color: var(--accent-color); }
.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-right: 5px;
    transition: var(--transition);
}
.btn-primary { background: var(--accent-color); color: white; }
.btn-danger { background: var(--danger-color); color: white; }
.btn-success { background: var(--success-color); color: white; }
.btn-warning { background: var(--warning-color); color: white; }
.btn-info { background: var(--accent-color); color: white; }

.btn:hover {
    opacity: 0.8;
    transform: scale(1.05);
}
#theme-toggle {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 9999;
    transition: var(--transition);
}
#theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    background: var(--accent-hover);
}
@media (max-width: 768px) {
    body {padding: 10px;}
    .login_registro,.perfil {margin: 20px auto;padding: 20px;}
    table {font-size: 12px;}
    th, td {padding: 10px;}
    button {width: 100%;margin-bottom: 10px;}
    #theme-toggle {bottom: 20px;right: 20px;width: 50px;height: 50px;}
}
.text-muted {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 20px;
}
.actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.login_registro,
.perfil {animation: fadeIn 0.3s ease;}
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}
.notificacion + .notificacion {
    margin-top: 10px;
}
.json-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 300px;
}
.data-card {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    font-size: 12px;
}
.json-line {
    display: flex;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px dashed var(--border-color);
}
.json-line:last-child {
    border-bottom: none;
}
.data-key {
    font-weight: 600;
    color: var(--accent-color);
    min-width: 100px;
    flex-shrink: 0;
}
.data-val {
    color: var(--text-primary);
    word-break: break-word;
    flex: 1;
}
.data-val pre {
    margin: 0;
    font-size: 10px;
    background: var(--bg-secondary);
    padding: 5px;
    border-radius: 4px;
    overflow: auto;
    max-height: 100px;
}
body.dark-mode .data-card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}
body.dark-mode .data-key {color: var(--accent-color);}
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    min-height: 100px;
    transition: var(--transition);
}
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}
textarea::placeholder {color: var(--text-secondary);}
textarea:disabled {
    background: var(--bg-primary);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.6;
    resize: none;
}
textarea:read-only {
    background: var(--bg-primary);
    cursor: default;
    resize: none;
}
textarea.sm { min-height: 60px; }
textarea.md { min-height: 100px; }
textarea.lg { min-height: 200px; }
textarea.xl { min-height: 300px; }
textarea.no-resize {
    resize: none;
}
.textarea-wrapper {position: relative;}
.textarea-wrapper textarea {padding-bottom: 30px;}
.char-count {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 11px;
    color: var(--text-secondary);
    pointer-events: none;}
textarea.is-valid {border-color: var(--success-color);}
textarea.is-invalid {border-color: var(--danger-color);}
textarea.is-warning {border-color: var(--warning-color);}
.textarea-error {
    color: var(--danger-color);
    font-size: 12px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;}
body.dark-mode textarea {
    background: var(--bg-input);
    border-color: var(--border-color);}
body.dark-mode textarea:focus {box-shadow: 0 0 0 3px rgba(99, 179, 237, 0.3);}
@media (max-width: 768px) {
textarea {font-size: 16px;padding: 10px 12px;min-height: 80px;}}
textarea::-webkit-scrollbar {width: 8px;height: 8px;}
textarea::-webkit-scrollbar-track {background: var(--bg-primary);border-radius: 4px;}
textarea::-webkit-scrollbar-thumb {background: var(--border-color);border-radius: 4px;}
textarea::-webkit-scrollbar-thumb:hover {background: var(--text-secondary);}
@keyframes focusPulse {
    0% { box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2); }
    50% { box-shadow: 0 0 0 5px rgba(66, 153, 225, 0.1); }
    100% { box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2); }
}
textarea:focus {animation: focusPulse 1.5s infinite;}
#btn-subir {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease}
#btn-subir.visible {opacity: 1;visibility: visible;}
#btn-subir::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: white;
    animation: spin 1s linear infinite;
    display: none;}
#btn-subir.scrolling::before {display: block;}
@keyframes spin { to { transform: rotate(360deg); }}
