/* Estilos base */
:root {
    --primary-color: #EC7244;
    --secondary-color: #20BBCC;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #9b59b6;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --text-color: #333333;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --border-color: #dddddd;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --header-bg: #ffffff;
    --footer-bg: #ffffff;
    --sidebar-bg: #f8f9fa;
    --sidebar-text: #333333;
    --hover-bg: #f5f5f5;
}

/* Estilos para modo oscuro */
[data-theme="dark"] {
    --primary-color: #EC7244;
    --secondary-color: #20BBCC;
    --danger-color: #ff1900;
    --warning-color: #fffb00;
    --info-color: #9b59b6;
    --light-color: #34495e;
    --dark-color: #ecf0f1;
    --text-color: #ecf0f1;
    --bg-color: #1a1a1a;
    --card-bg: #2c2c2c;
    --border-color: #444444;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --header-bg: #2c2c2c;
    --footer-bg: #2c2c2c;
    --sidebar-bg: #222222;
    --sidebar-text: #ecf0f1;
    --hover-bg: #333333;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* Contenedor principal */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.row.justify-content-center {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    margin: 80px 0px 40px 0px;
}

/* Header */
header {
    background-color: var(--header-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

/* Navegación */
nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: var(--hover-bg);
}

/* User menu */
.user-menu {
    display: flex;
    align-items: center;
    position: relative;
    gap: 8px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.user-menu > span {
    font-size: 14px;
    font-weight: 500;
    margin: 0 5px;
}

.user-menu > .header-btn {
    display: inline-flex !important;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: var(--shadow);
    min-width: 200px;
    display: none;
    z-index: 150;
    flex-direction: column;
}

.user-dropdown.show {
    display: flex;
}

.user-dropdown a {
    padding: 10px 15px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-dropdown a:last-child {
    border-bottom: none;
}

.user-dropdown a:hover {
    background-color: var(--hover-bg);
}

/* Theme toggle */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 18px;
    margin-left: 10px;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.theme-toggle:hover {
    background-color: var(--hover-bg);
}

/* Header buttons */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 20px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-btn:hover {
    background-color: var(--hover-bg);
}

/* Menu hamburguesa */
.main-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 200;
    transition: right 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-menu.show {
    right: 0;
}

.main-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    position: sticky;
    top: 0;
    background-color: var(--header-bg);
    width: 100%;
    max-width: 600px;
}

.main-menu-header h2 {
    margin: 0;
    font-size: 20px;
}

.main-menu-close {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-color);
    cursor: pointer;
    padding: 0;
}

.main-menu-nav {
    flex: 1;
    padding: 20px 0;
    width: 100%;
    max-width: 600px;
}

.main-menu-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.main-menu-nav li {
    margin: 0;
}

.main-menu-nav a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-color);
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.main-menu-nav a:hover,
.main-menu-nav a.active {
    background-color: var(--primary-color);
    color: white;
}

.main-menu-nav i {
    margin-right: 15px;
    width: 24px;
    text-align: center;
    font-size: 18px;
}

/* Mostrar botones en mobile */
@media (max-width: 768px) {
    .header-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .main-menu {
        width: 100%;
    }
}

/* Main content */
main {
    display: flex;
    flex: 1;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    padding: 20px 0;
    transition: background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-menu {
    list-style: none;
    flex: 1;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--sidebar-text);
    transition: background-color 0.3s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: var(--hover-bg);
}

.sidebar-menu i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Sidebar footer - theme toggle anclado abajo a izquierda */
.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    position: sticky;
    bottom: 0;
    background-color: var(--sidebar-bg);
}

.sidebar-footer .theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* Content */
.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    min-height: 0;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.card-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: -20px;
}

.card-header-user {
    padding: 0px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: 20px 0px 0px 0px;
}

.card-body-recover {
    padding: 0px 0px 20px 0px;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    background-color: var(--hover-bg);
}

.table tr:hover {
    background-color: var(--hover-bg);
}

/* Site stats row */
.site-stats-row {
    background-color: var(--card-bg);
}

.site-stats-details {
    padding: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    padding: 10px;
    background-color: var(--hover-bg);
    border-radius: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 5px;
    font-weight: 500;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-online {
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.status-offline {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.status-unknown {
    background-color: rgba(149, 165, 166, 0.2);
    color: #95a5a6;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    color:  #fff;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #0c7a87;
    color: #fff;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-group {
    display: flex;
    gap: 10px;
}

a.btn.btn-primary.btn-lg {
    max-width: 185px;
    margin: 0 auto;
    margin-top: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 10px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-group-recover {
    text-align: left;
    padding: 20px 0px;
}

/* Site monitor cards */
.site-monitor {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.site-monitor:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.site-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 15px;
}

.site-status.online {
    background-color: var(--secondary-color);
}

.site-status.offline {
    background-color: var(--danger-color);
}

.site-status.unknown {
    background-color: #95a5a6;
}

.site-info {
    flex: 1;
}

.site-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.site-url {
    color: #7f8c8d;
    font-size: 14px;
}

.site-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-response-time {
    font-size: 14px;
}

.site-last-check {
    font-size: 14px;
    color: #7f8c8d;
}

.site-actions {
    display: flex;
    gap: 10px;
}

/* Expandable details */
.expandable-details {
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    padding: 0;
    margin: 0;
}

.expandable-details.show {
    display: block;
    max-height: 2000px;
    opacity: 1;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.detail-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.detail-tab {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.detail-tab.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

.detail-content {
    display: none;
}

.detail-content.active {
    display: block;
}

/* Charts */
.chart-container {
    height: 300px;
    margin-bottom: 20px;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    color: #7f8c8d;
    font-size: 14px;
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-logo {
    margin-bottom: 15px;
}

.footer-menu {
    display: flex;
    list-style: none;
    margin-bottom: 15px;
}

.footer-menu li {
    margin: 0 10px;
}

.copyright {
    color: #7f8c8d;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        width: 200px;
    }
}

@media (max-width: 768px) {
    main {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        order: 2;
        position: relative;
        top: auto;
        max-height: none;
    }
    
    .content {
        order: 1;
    }
    
    .header-content {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 15px;
    }
    
    nav ul li {
        margin: 0 10px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 576px) {
    .site-monitor {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .site-details {
        margin-top: 10px;
        width: 100%;
        justify-content: space-between;
    }
    
    .site-actions {
        margin-top: 10px;
        width: 100%;
        justify-content: flex-end;
    }
    
    .footer-menu {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-menu li {
        margin: 5px 0;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Loading spinner */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--primary-color);
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-color);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Alert */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.2);
    color: #27ae60;
    border-left: 4px solid #2ecc71;
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.2);
    color: #c0392b;
    border-left: 4px solid #e74c3c;
}

.alert-warning {
    background-color: rgba(243, 156, 18, 0.2);
    color: #d68910;
    border-left: 4px solid #f39c12;
}

.alert-info {
    background-color: rgba(155, 89, 182, 0.2);
    color: #8e44ad;
    border-left: 4px solid #9b59b6;
}

/* Otros */
hr.my-4 {
    margin: 10px 26%;
}

/* Login - Register */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90vh;
    background: #FFFFFF;
    margin: 0px auto;
}

.auth-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.auth-card h1, .auth-card h2 {
    text-align: center;
    color: #333;
    margin-bottom: 0px;
    font-size: 28px;
}

.auth-card-user {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.auth-card-user h1, .auth-card-user h2 {
    text-align: center;
    color: #333;
    margin-bottom: 0px;
    font-size: 28px;
}

.authpar {
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 2px;
    color: #555;
    font-weight: 500;
    text-align: left;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #EC7244;
    box-shadow: 0 0 0 3px rgba(236, 114, 68, 0.1);
}

.form-group small {
    display: block;
    color: #999;
    margin-top: 5px;
    font-size: 12px;
}

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
}

.alert-danger {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.alert-success {
    background-color: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.btn-primary {
    width: auto;
    padding: 5px 15px;
    background-color: #EC7244;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #d65f3a;
}

button.regbot, button.botini {
    margin: 10px 0px 0px 0px;
    padding: 10px 20px;
    width: 100%;
}

.auth-footer {
    text-align: center;
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

.auth-footer a {
    color: #EC7244;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.back-link {
    display: block;
    text-align: center;
    margin-bottom: 5px;
    color: #EC7244;
    text-decoration: none;
    font-size: 14px;
}

.back-link:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 25px;
    }

    .auth-card h1 {
        font-size: 24px;
    }
}

/* mas */
p.card-text {
    padding-bottom: 5px;
}
body > main > div > div > h1 {
    margin-bottom: 15px;
}