body {
    font-family: 'Roboto', 'Arial', sans-serif;
    background-color: #f3f4f6;
    color: #111827;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

.app-layout {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    flex-shrink: 0;
}

.sidebar-header {
    margin-bottom: 32px;
    text-align: center;
}

.logo {
    max-width: 120px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    font-size: 14px;
    border: none;
    background: transparent;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: all 0.2s;
}

.nav-item:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.nav-item.tab--active {
    background-color: #111827;
    color: #ffffff;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: #f3f4f6;
    overflow: hidden;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    background-color: #f3f4f6; /* O blanco si prefieres header distinguido */
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.btn-logout {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #ef4444;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #fee2e2;
    border-color: #fecaca;
}

.content-area {
    flex-grow: 1;
    padding: 0 32px 32px;
    overflow-y: auto;
}

/* Ajustes para las cards existentes */
.card {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Ocultar elementos viejos si quedaron */
.container, .top, .tabs {
    display: none; /* Por seguridad si algo quedó */
}

.is-hidden {
    display: none;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
        height: auto;
        overflow: auto;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        padding: 16px;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .nav-item {
        white-space: nowrap;
        width: auto;
    }

    .main-content {
        height: auto;
        overflow: visible;
    }

    .content-area {
        padding: 16px;
    }
}

/* Estilos anteriores necesarios */
.panel {
    background: #f9fafb;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 16px;
}

.panel-title {
    font-weight: 800;
    color: #6d28d9;
    margin-bottom: 12px;
}

.btn-purple {
    background-color: #6d28d9;
    color: #ffffff;
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    width: fit-content;
}

.btn-purple:hover:not([disabled]) {
    background-color: #5b21b6;
}

.segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.segmented-btn {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    cursor: pointer;
    font-weight: 800;
}

.segmented-btn--ok.is-active {
    border-color: #15803d;
    background: #ecfdf3;
    color: #15803d;
}

.segmented-btn--bad.is-active {
    border-color: #dc2626;
    background: #fef2f2;
    color: #dc2626;
}

.footer {
    text-align: center;
    color: #9ca3af;
    font-size: 11px;
    margin-top: 18px;
    line-height: 1.6;
}

.card {
    background-color: #ffffff;
    padding: 42px;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px rgba(17,24,39,0.08);
    margin-bottom: 0;
    width: min(780px, 100%);
}

.card-title {
    margin: 0 0 22px;
    font-size: 20px;
    font-weight: 700;
}

.registro-form {
    display: grid;
    gap: 18px;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 13px;
    color: #111827;
}

.input-group input[type="text"],
.input-group input[type="email"],
.input-group input[type="number"],
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 12px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #ffffff;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: #111827;
    outline: none;
    box-shadow: 0 0 0 3px rgba(17,24,39,0.10);
}

.row {
    display: flex;
    gap: 20px;
}

.half-width {
    flex: 1;
}

.btn-primary {
    background-color: #dc2626;
    color: #ffffff;
    padding: 14px 18px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    font-size: 14px;
    font-weight: 700;
    margin-top: 12px;
    transition: background-color 0.2s ease, opacity 0.2s;
}

.btn-primary:hover:not([disabled]) {
    background-color: #b91c1c;
}

.btn-primary:disabled {
    background-color: #fca5a5;
    cursor: not-allowed;
    opacity: 0.9;
}

#mensaje {
    margin-top: 22px;
    padding: 15px;
    border-radius: 12px;
    font-weight: bold;
    display: none;
}

.mensaje-oculto {
    display: none;
}

.mensaje-exito {
    background-color: #e6f4ea;
    color: #137333;
    border-left: 5px solid #34a853;
}

.mensaje-error {
    background-color: #fce8e6;
    color: #d93025;
    border-left: 5px solid #ea4335;
}

@media (max-width: 720px) {
    body {
        padding: 40px 16px;
    }

    .tabs {
        flex-wrap: wrap;
        border-radius: 18px;
        padding: 10px;
    }

    .tab {
        flex: 1 1 auto;
    }

    .card {
        padding: 26px;
    }

    .row {
        flex-direction: column;
        gap: 14px;
    }

    .segmented {
        grid-template-columns: 1fr;
    }
}
